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

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

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/platform/ContextMenu.h ('k') | Source/WebCore/platform/ContextMenuItem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/ContextMenu.cpp
diff --git a/Source/WebCore/platform/ContextMenu.cpp b/Source/WebCore/platform/ContextMenu.cpp
index 0bd1bf2ed14d49d7b208a9e90672d2f0840adb48..8341421398c75c8ac9ce8964b8320ccec38cb74b 100644
--- a/Source/WebCore/platform/ContextMenu.cpp
+++ b/Source/WebCore/platform/ContextMenu.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "ContextMenu.h"
-#if ENABLE(CONTEXT_MENUS) && USE(CROSS_PLATFORM_CONTEXT_MENUS)
+#if ENABLE(CONTEXT_MENUS)
namespace WebCore {
@@ -49,13 +49,11 @@ static const ContextMenuItem* findItemWithAction(unsigned action, const Vector<C
return 0;
}
-ContextMenuItem* ContextMenu::itemWithAction(unsigned action)
+const ContextMenuItem* ContextMenu::itemWithAction(unsigned action)
{
- // FIXME: When more platforms switch over, this fucntion should return a const ContextMenuItem*'s, and the const_cast
- // won't be needed anymore.
- return const_cast<ContextMenuItem*>(findItemWithAction(action, m_items));
+ return findItemWithAction(action, m_items);
}
} // namespace WebCore
-#endif // ENABLE(CONTEXT_MENUS) && USE(CROSS_PLATFORM_CONTEXT_MENUS)
+#endif // ENABLE(CONTEXT_MENUS)
« no previous file with comments | « Source/WebCore/platform/ContextMenu.h ('k') | Source/WebCore/platform/ContextMenuItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698