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

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

Issue 1102173002: Move GuestView layer in browser to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test change to build Created 5 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 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 <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 IDS_CONTENT_CONTEXT_MUTE); 771 IDS_CONTENT_CONTEXT_MUTE);
772 772
773 menu_model_.AddCheckItemWithStringId(IDC_CONTENT_CONTEXT_LOOP, 773 menu_model_.AddCheckItemWithStringId(IDC_CONTENT_CONTEXT_LOOP,
774 IDS_CONTENT_CONTEXT_LOOP); 774 IDS_CONTENT_CONTEXT_LOOP);
775 menu_model_.AddCheckItemWithStringId(IDC_CONTENT_CONTEXT_CONTROLS, 775 menu_model_.AddCheckItemWithStringId(IDC_CONTENT_CONTEXT_CONTROLS,
776 IDS_CONTENT_CONTEXT_CONTROLS); 776 IDS_CONTENT_CONTEXT_CONTROLS);
777 } 777 }
778 778
779 void RenderViewContextMenu::AppendPluginItems() { 779 void RenderViewContextMenu::AppendPluginItems() {
780 if (params_.page_url == params_.src_url || 780 if (params_.page_url == params_.src_url ||
781 extensions::GuestViewBase::IsGuest(source_web_contents_)) { 781 guestview::GuestViewBase::IsGuest(source_web_contents_)) {
782 // Full page plugin, so show page menu items. 782 // Full page plugin, so show page menu items.
783 if (params_.link_url.is_empty() && params_.selection_text.empty()) 783 if (params_.link_url.is_empty() && params_.selection_text.empty())
784 AppendPageItems(); 784 AppendPageItems();
785 } else { 785 } else {
786 menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_SAVEAVAS, 786 menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_SAVEAVAS,
787 IDS_CONTENT_CONTEXT_SAVEPAGEAS); 787 IDS_CONTENT_CONTEXT_SAVEPAGEAS);
788 // The "Print" menu item should always be included for plugins. If 788 // The "Print" menu item should always be included for plugins. If
789 // content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_PRINT) 789 // content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_PRINT)
790 // is true the item will be added inside AppendPrintItem(). Otherwise we 790 // is true the item will be added inside AppendPrintItem(). Otherwise we
791 // add "Print" here. 791 // add "Print" here.
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 source_web_contents_->GetRenderViewHost()-> 1818 source_web_contents_->GetRenderViewHost()->
1819 ExecuteMediaPlayerActionAtLocation(location, action); 1819 ExecuteMediaPlayerActionAtLocation(location, action);
1820 } 1820 }
1821 1821
1822 void RenderViewContextMenu::PluginActionAt( 1822 void RenderViewContextMenu::PluginActionAt(
1823 const gfx::Point& location, 1823 const gfx::Point& location,
1824 const WebPluginAction& action) { 1824 const WebPluginAction& action) {
1825 source_web_contents_->GetRenderViewHost()-> 1825 source_web_contents_->GetRenderViewHost()->
1826 ExecutePluginActionAtLocation(location, action); 1826 ExecutePluginActionAtLocation(location, action);
1827 } 1827 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698