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

Unified Diff: chrome/browser/guestview/webview/context_menu_content_type_webview.cc

Issue 169093009: Separate out logic to handle different category/group of context menu items from RVContextMenu class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@work-mmm-refactor1
Patch Set: fix semicolon Created 6 years, 10 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
Index: chrome/browser/guestview/webview/context_menu_content_type_webview.cc
diff --git a/chrome/browser/guestview/webview/context_menu_content_type_webview.cc b/chrome/browser/guestview/webview/context_menu_content_type_webview.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1c9f90d649e17b8b3cc7cf00005dce5d6140ad11
--- /dev/null
+++ b/chrome/browser/guestview/webview/context_menu_content_type_webview.cc
@@ -0,0 +1,30 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/guestview/webview/context_menu_content_type_webview.h"
+
+ContextMenuContentTypeWebView::ContextMenuContentTypeWebView(
+ content::RenderFrameHost* render_frame_host,
+ const content::ContextMenuParams& params)
+ : ContextMenuContentType(render_frame_host, params, true) {
+}
+
+ContextMenuContentTypeWebView::~ContextMenuContentTypeWebView() {
+}
+
+bool ContextMenuContentTypeWebView::SupportsGroup(int group) {
+ switch (group) {
+ case ITEM_GROUP_PAGE:
+ case ITEM_GROUP_FRAME:
+ case ITEM_GROUP_LINK:
+ case ITEM_GROUP_SEARCH_PROVIDER:
+ case ITEM_GROUP_PRINT:
+ case ITEM_GROUP_ALL_EXTENSION:
+ case ITEM_GROUP_CURRENT_EXTENSION:
+ case ITEM_GROUP_PRINT_PREVIEW:
+ return false;
+ default:
+ return ContextMenuContentType::SupportsGroup(group);
+ }
+}
« no previous file with comments | « chrome/browser/guestview/webview/context_menu_content_type_webview.h ('k') | chrome/browser/renderer_context_menu/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698