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

Unified Diff: chrome/browser/tab_contents/menu_category_guest.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 incorrect dcheck + platform app logic 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/tab_contents/menu_category_guest.cc
diff --git a/chrome/browser/tab_contents/menu_category_guest.cc b/chrome/browser/tab_contents/menu_category_guest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9a1c266d92a3eaf010b7c8cb6c208294bb5c1372
--- /dev/null
+++ b/chrome/browser/tab_contents/menu_category_guest.cc
@@ -0,0 +1,30 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
Fady Samuel 2014/02/24 19:07:29 Can we somehow move this file to the webview direc
lazyboy 2014/02/24 23:45:00 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/tab_contents/menu_category_guest.h"
+
+MenuCategoryGuest::MenuCategoryGuest(
+ content::RenderFrameHost* render_frame_host,
+ const content::ContextMenuParams& params)
+ : MenuCategoryBase(render_frame_host, params) {
+}
+
+MenuCategoryGuest::~MenuCategoryGuest() {
+}
+
+bool MenuCategoryGuest::IsCategoryEnabled(int category) {
+ switch (category) {
+ case ITEM_CATEGORY_PAGE:
+ case ITEM_CATEGORY_FRAME:
+ case ITEM_CATEGORY_LINK:
+ case ITEM_CATEGORY_SEARCH_PROVIDER:
+ case ITEM_CATEGORY_PRINT:
+ case ITEM_CATEGORY_ALL_EXTENSION:
+ case ITEM_CATEGORY_CURRENT_EXTENSION:
+ case ITEM_CATEGORY_PRINT_PREVIEW:
+ return false;
+ default:
+ return MenuCategoryBase::IsCategoryEnabled(category);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698