Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Unified Diff: Source/WebCore/platform/ContextMenu.h

Issue 14185003: Use ContextMenu code path that was guarded by CROSS_PLATFORM_CONTEXT_MENU (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use ContextMenu code path that was guarded by CROSS_PLATFORM_CONTEXT_MENU Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/page/ContextMenuProvider.h ('k') | Source/WebCore/platform/ContextMenu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/ContextMenu.h
diff --git a/Source/WebCore/platform/ContextMenu.h b/Source/WebCore/platform/ContextMenu.h
index 7d705bd5d38c855b9ba38a5019d1a2afd3e0506c..8ddd8ea29062bae1275db4db86e264a3b9aa7181 100644
--- a/Source/WebCore/platform/ContextMenu.h
+++ b/Source/WebCore/platform/ContextMenu.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ContextMenu_h
@@ -31,21 +31,21 @@
#include <wtf/Noncopyable.h>
#include "ContextMenuItem.h"
-#include "PlatformMenuDescription.h"
#include <wtf/text/WTFString.h>
namespace WebCore {
class ContextMenuController;
+ typedef void* PlatformContextMenu;
+
class ContextMenu {
WTF_MAKE_NONCOPYABLE(ContextMenu); WTF_MAKE_FAST_ALLOCATED;
public:
ContextMenu();
- ContextMenuItem* itemWithAction(unsigned);
+ const ContextMenuItem* itemWithAction(unsigned);
-#if USE(CROSS_PLATFORM_CONTEXT_MENUS)
explicit ContextMenu(PlatformContextMenu);
PlatformContextMenu platformContextMenu() const;
@@ -53,40 +53,16 @@ namespace WebCore {
static PlatformContextMenu createPlatformContextMenuFromItems(const Vector<ContextMenuItem>&);
static void getContextMenuItems(PlatformContextMenu, Vector<ContextMenuItem>&);
- // FIXME: When more platforms switch over, this should return const ContextMenuItem*'s.
- ContextMenuItem* itemAtIndex(unsigned index) { return &m_items[index]; }
+ const ContextMenuItem* itemAtIndex(unsigned index) { return &m_items[index]; }
void setItems(const Vector<ContextMenuItem>& items) { m_items = items; }
const Vector<ContextMenuItem>& items() const { return m_items; }
- void appendItem(const ContextMenuItem& item) { m_items.append(item); }
-#else
- explicit ContextMenu(const PlatformMenuDescription);
- ~ContextMenu();
-
- void insertItem(unsigned position, ContextMenuItem&);
- void appendItem(ContextMenuItem&);
-
- ContextMenuItem* itemAtIndex(unsigned, const PlatformMenuDescription);
-
- unsigned itemCount() const;
-
- PlatformMenuDescription platformDescription() const;
- void setPlatformDescription(PlatformMenuDescription);
-
- PlatformMenuDescription releasePlatformDescription();
-
-#endif // USE(CROSS_PLATFORM_CONTEXT_MENUS)
+ void appendItem(const ContextMenuItem& item) { m_items.append(item); }
private:
Vector<ContextMenuItem> m_items;
};
-
-#if !USE(CROSS_PLATFORM_CONTEXT_MENUS)
-Vector<ContextMenuItem> contextMenuItemVector(PlatformMenuDescription);
-PlatformMenuDescription platformMenuDescription(Vector<ContextMenuItem>&);
-#endif
-
}
#endif // ENABLE(CONTEXT_MENUS)
« no previous file with comments | « Source/WebCore/page/ContextMenuProvider.h ('k') | Source/WebCore/platform/ContextMenu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698