Hide the 'Add to Photos' item if it isn't available
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Oct 2014 20:24:13 +0000 (20:24 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Oct 2014 20:24:13 +0000 (20:24 +0000)
commit50371096a561845388af767e60c3e248c1259713
tree2430d0b15232c1c0be72c855b73026add477bcc3
parent39e4140a341cfe76d08ee97bf046c915bc351cc6
Hide the 'Add to Photos' item if it isn't available
https://bugs.webkit.org/show_bug.cgi?id=138182
<rdar://problem/18814999>

Reviewed by Beth Dakin.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForImage]):
(-[WKActionMenuController _canAddImageToPhotos]):
(-[WKActionMenuController _addImageToPhotos:]):
Factor _canAddImageToPhotos out of _addImageToPhotos:, and use it in
_defaultMenuItemsForImage to avoid including the menu item in the first place.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175339 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm