OLD | NEW |
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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 | 454 |
455 void RenderViewContextMenu::AppendCurrentExtensionItems() { | 455 void RenderViewContextMenu::AppendCurrentExtensionItems() { |
456 // Avoid appending extension related items when |extension| is null. | 456 // Avoid appending extension related items when |extension| is null. |
457 // For Panel, this happens when the panel is navigated to a url outside of the | 457 // For Panel, this happens when the panel is navigated to a url outside of the |
458 // extension's package. | 458 // extension's package. |
459 const Extension* extension = GetExtension(); | 459 const Extension* extension = GetExtension(); |
460 if (extension) { | 460 if (extension) { |
461 // Only add extension items from this extension. | 461 // Only add extension items from this extension. |
462 int index = 0; | 462 int index = 0; |
463 const MenuItem::ExtensionKey key( | 463 const MenuItem::ExtensionKey key( |
464 extension->id(), WebViewGuest::GetViewInstanceId(source_web_contents_)); | 464 extension->id(), |
| 465 extensions::WebViewGuest::GetViewInstanceId(source_web_contents_)); |
465 extension_items_.AppendExtensionItems( | 466 extension_items_.AppendExtensionItems( |
466 key, PrintableSelectionText(), &index); | 467 key, PrintableSelectionText(), &index); |
467 } | 468 } |
468 } | 469 } |
469 | 470 |
470 void RenderViewContextMenu::InitMenu() { | 471 void RenderViewContextMenu::InitMenu() { |
471 RenderViewContextMenuBase::InitMenu(); | 472 RenderViewContextMenuBase::InitMenu(); |
472 | 473 |
473 if (content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_PAGE)) | 474 if (content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_PAGE)) |
474 AppendPageItems(); | 475 AppendPageItems(); |
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1784 source_web_contents_->GetRenderViewHost()-> | 1785 source_web_contents_->GetRenderViewHost()-> |
1785 ExecuteMediaPlayerActionAtLocation(location, action); | 1786 ExecuteMediaPlayerActionAtLocation(location, action); |
1786 } | 1787 } |
1787 | 1788 |
1788 void RenderViewContextMenu::PluginActionAt( | 1789 void RenderViewContextMenu::PluginActionAt( |
1789 const gfx::Point& location, | 1790 const gfx::Point& location, |
1790 const WebPluginAction& action) { | 1791 const WebPluginAction& action) { |
1791 source_web_contents_->GetRenderViewHost()-> | 1792 source_web_contents_->GetRenderViewHost()-> |
1792 ExecutePluginActionAtLocation(location, action); | 1793 ExecutePluginActionAtLocation(location, action); |
1793 } | 1794 } |
OLD | NEW |