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

Unified Diff: Source/WebCore/page/ContextMenuController.cpp

Issue 13646003: DevTools: Remove ENABLE(INSPECTOR) and ENABLE(JAVASCRIPT_DEBUGGER) from the code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments addressed 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/Console.cpp ('k') | Source/WebCore/page/FrameView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/page/ContextMenuController.cpp
diff --git a/Source/WebCore/page/ContextMenuController.cpp b/Source/WebCore/page/ContextMenuController.cpp
index 5667c0ba60ca8489c1d868fc961eba99e42f7425..78b4bff9448e512f605ca9797a24bd923ace529d 100644
--- a/Source/WebCore/page/ContextMenuController.cpp
+++ b/Source/WebCore/page/ContextMenuController.cpp
@@ -164,10 +164,8 @@ PassOwnPtr<ContextMenu> ContextMenuController::createContextMenu(Event* event)
void ContextMenuController::showContextMenu(Event* event)
{
-#if ENABLE(INSPECTOR)
if (m_page->inspectorController()->enabled())
addInspectElementItem();
-#endif
#if USE(CROSS_PLATFORM_CONTEXT_MENUS)
m_contextMenu = m_client->customizeMenu(m_contextMenu.release());
@@ -498,12 +496,10 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
frame->editor()->toggleAutomaticSpellingCorrection();
break;
#endif
-#if ENABLE(INSPECTOR)
case ContextMenuItemTagInspectElement:
if (Page* page = frame->page())
page->inspectorController()->inspect(m_hitTestResult.innerNonSharedNode());
break;
-#endif
case ContextMenuItemTagDictationAlternative:
frame->editor()->applyDictationAlternativelternative(item->title());
break;
@@ -886,9 +882,7 @@ void ContextMenuController::populate()
appendItem(SpeechMenuItem, m_contextMenu.get());
#endif
} else {
-#if ENABLE(INSPECTOR)
if (!(frame->page() && frame->page()->inspectorController()->hasInspectorFrontendClient())) {
-#endif
// In GTK+ and EFL, unavailable items are not hidden but insensitive.
#if PLATFORM(GTK) || PLATFORM(EFL)
@@ -910,9 +904,7 @@ void ContextMenuController::populate()
else
appendItem(ReloadItem, m_contextMenu.get());
#endif
-#if ENABLE(INSPECTOR)
}
-#endif
if (frame->page() && frame != frame->page()->mainFrame())
appendItem(OpenFrameItem, m_contextMenu.get());
@@ -1093,7 +1085,6 @@ void ContextMenuController::populate()
}
}
-#if ENABLE(INSPECTOR)
void ContextMenuController::addInspectElementItem()
{
Node* node = m_hitTestResult.innerNonSharedNode();
@@ -1120,7 +1111,6 @@ void ContextMenuController::addInspectElementItem()
appendItem(*separatorItem(), m_contextMenu.get());
appendItem(InspectElementItem, m_contextMenu.get());
}
-#endif // ENABLE(INSPECTOR)
void ContextMenuController::checkOrEnableIfNeeded(ContextMenuItem& item) const
{
@@ -1372,9 +1362,7 @@ void ContextMenuController::checkOrEnableIfNeeded(ContextMenuItem& item) const
case ContextMenuItemTagTextDirectionMenu:
case ContextMenuItemTagPDFSinglePageScrolling:
case ContextMenuItemTagPDFFacingPagesScrolling:
-#if ENABLE(INSPECTOR)
case ContextMenuItemTagInspectElement:
-#endif
case ContextMenuItemBaseCustomTag:
case ContextMenuItemCustomTagNoAction:
case ContextMenuItemLastCustomTag:
« no previous file with comments | « Source/WebCore/page/Console.cpp ('k') | Source/WebCore/page/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698