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

Side by Side Diff: chrome/browser/renderer_context_menu/context_menu_content_type_panel.cc

Issue 773123002: 'Search Google for ...' menu item is not coming for selected text in extension panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_context_menu/context_menu_content_type_panel.h " 5 #include "chrome/browser/renderer_context_menu/context_menu_content_type_panel.h "
6 6
7 ContextMenuContentTypePanel::ContextMenuContentTypePanel( 7 ContextMenuContentTypePanel::ContextMenuContentTypePanel(
8 content::WebContents* web_contents, 8 content::WebContents* web_contents,
9 const content::ContextMenuParams& params) 9 const content::ContextMenuParams& params)
10 : ContextMenuContentType(web_contents, params, false) { 10 : ContextMenuContentType(web_contents, params, false) {
11 } 11 }
12 12
13 ContextMenuContentTypePanel::~ContextMenuContentTypePanel() { 13 ContextMenuContentTypePanel::~ContextMenuContentTypePanel() {
14 } 14 }
15 15
16 bool ContextMenuContentTypePanel::SupportsGroup(int group) { 16 bool ContextMenuContentTypePanel::SupportsGroup(int group) {
17 switch (group) { 17 switch (group) {
18 case ITEM_GROUP_LINK: 18 case ITEM_GROUP_LINK:
19 // Checking link should take precedence before checking selection since on 19 // Checking link should take precedence before checking selection since on
20 // Mac right-clicking a link will also make it selected. 20 // Mac right-clicking a link will also make it selected.
21 return params().unfiltered_link_url.is_valid(); 21 return params().unfiltered_link_url.is_valid();
22 case ITEM_GROUP_EDITABLE: 22 case ITEM_GROUP_EDITABLE:
23 case ITEM_GROUP_COPY: 23 case ITEM_GROUP_COPY:
24 case ITEM_GROUP_SEARCH_PROVIDER:
24 return ContextMenuContentType::SupportsGroup(group); 25 return ContextMenuContentType::SupportsGroup(group);
25 case ITEM_GROUP_CURRENT_EXTENSION: 26 case ITEM_GROUP_CURRENT_EXTENSION:
26 return true; 27 return true;
27 default: 28 default:
28 return false; 29 return false;
29 } 30 }
30 } 31 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698