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

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

Issue 104833006: Switch ContentSettingsObserver to be a RenderFrameObserver instead of a RenderViewObserver (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/tab_contents/render_view_context_menu.h" 5 #include "chrome/browser/tab_contents/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 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 RenderViewHost* rvh = source_web_contents_->GetRenderViewHost(); 1517 RenderViewHost* rvh = source_web_contents_->GetRenderViewHost();
1518 1518
1519 // Process custom actions range. 1519 // Process custom actions range.
1520 if (id >= IDC_CONTENT_CONTEXT_CUSTOM_FIRST && 1520 if (id >= IDC_CONTENT_CONTEXT_CUSTOM_FIRST &&
1521 id <= IDC_CONTENT_CONTEXT_CUSTOM_LAST) { 1521 id <= IDC_CONTENT_CONTEXT_CUSTOM_LAST) {
1522 unsigned action = id - IDC_CONTENT_CONTEXT_CUSTOM_FIRST; 1522 unsigned action = id - IDC_CONTENT_CONTEXT_CUSTOM_FIRST;
1523 const content::CustomContextMenuContext& context = params_.custom_context; 1523 const content::CustomContextMenuContext& context = params_.custom_context;
1524 #if defined(ENABLE_PLUGINS) 1524 #if defined(ENABLE_PLUGINS)
1525 if (context.request_id && !context.is_pepper_menu) { 1525 if (context.request_id && !context.is_pepper_menu) {
1526 ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins( 1526 ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins(
1527 rvh->GetProcess()->GetID()); 1527 source_web_contents_, false, std::string());
1528 } 1528 }
1529 #endif 1529 #endif
1530 rvh->ExecuteCustomContextMenuCommand(action, context); 1530 rvh->ExecuteCustomContextMenuCommand(action, context);
1531 return; 1531 return;
1532 } 1532 }
1533 1533
1534 // Process extension menu items. 1534 // Process extension menu items.
1535 if (id >= IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST && 1535 if (id >= IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST &&
1536 id <= IDC_EXTENSIONS_CONTEXT_CUSTOM_LAST) { 1536 id <= IDC_EXTENSIONS_CONTEXT_CUSTOM_LAST) {
1537 extension_items_.ExecuteCommand(id, source_web_contents_, params_); 1537 extension_items_.ExecuteCommand(id, source_web_contents_, params_);
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 source_web_contents_->GetRenderViewHost()-> 2113 source_web_contents_->GetRenderViewHost()->
2114 ExecuteMediaPlayerActionAtLocation(location, action); 2114 ExecuteMediaPlayerActionAtLocation(location, action);
2115 } 2115 }
2116 2116
2117 void RenderViewContextMenu::PluginActionAt( 2117 void RenderViewContextMenu::PluginActionAt(
2118 const gfx::Point& location, 2118 const gfx::Point& location,
2119 const WebPluginAction& action) { 2119 const WebPluginAction& action) {
2120 source_web_contents_->GetRenderViewHost()-> 2120 source_web_contents_->GetRenderViewHost()->
2121 ExecutePluginActionAtLocation(location, action); 2121 ExecutePluginActionAtLocation(location, action);
2122 } 2122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698