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

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

Issue 2478573004: Convert GURL::{host,path} to GURL::{host_piece,path_piece} for ==. (Closed)
Patch Set: rebase to #431874 Created 4 years, 1 month 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
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/render_view_context_menu.h" 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 527
528 // static 528 // static
529 bool RenderViewContextMenu::IsDevToolsURL(const GURL& url) { 529 bool RenderViewContextMenu::IsDevToolsURL(const GURL& url) {
530 return url.SchemeIs(content::kChromeDevToolsScheme); 530 return url.SchemeIs(content::kChromeDevToolsScheme);
531 } 531 }
532 532
533 // static 533 // static
534 bool RenderViewContextMenu::IsInternalResourcesURL(const GURL& url) { 534 bool RenderViewContextMenu::IsInternalResourcesURL(const GURL& url) {
535 if (!url.SchemeIs(content::kChromeUIScheme)) 535 if (!url.SchemeIs(content::kChromeUIScheme))
536 return false; 536 return false;
537 return url.host() == chrome::kChromeUISyncResourcesHost; 537 return url.host_piece() == chrome::kChromeUISyncResourcesHost;
538 } 538 }
539 539
540 // static 540 // static
541 void RenderViewContextMenu::AddSpellCheckServiceItem(ui::SimpleMenuModel* menu, 541 void RenderViewContextMenu::AddSpellCheckServiceItem(ui::SimpleMenuModel* menu,
542 bool is_checked) { 542 bool is_checked) {
543 // When the Google branding experiment is enabled, we want to show an icon 543 // When the Google branding experiment is enabled, we want to show an icon
544 // next to this item, but we can't show icons on check items. So when the 544 // next to this item, but we can't show icons on check items. So when the
545 // item is enabled show it as checked, and otherwise add it as a normal item 545 // item is enabled show it as checked, and otherwise add it as a normal item
546 // (instead of a check item) so that, if necessary, we can add the Google 546 // (instead of a check item) so that, if necessary, we can add the Google
547 // icon. (If the experiment is off, there's no harm in adding this as a 547 // icon. (If the experiment is off, there's no harm in adding this as a
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 void RenderViewContextMenu::PluginActionAt( 2500 void RenderViewContextMenu::PluginActionAt(
2501 const gfx::Point& location, 2501 const gfx::Point& location,
2502 const WebPluginAction& action) { 2502 const WebPluginAction& action) {
2503 source_web_contents_->GetRenderViewHost()-> 2503 source_web_contents_->GetRenderViewHost()->
2504 ExecutePluginActionAtLocation(location, action); 2504 ExecutePluginActionAtLocation(location, action);
2505 } 2505 }
2506 2506
2507 Browser* RenderViewContextMenu::GetBrowser() const { 2507 Browser* RenderViewContextMenu::GetBrowser() const {
2508 return chrome::FindBrowserWithWebContents(embedder_web_contents_); 2508 return chrome::FindBrowserWithWebContents(embedder_web_contents_);
2509 } 2509 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698