OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 5 #include <algorithm> |
6 #include <set> | 6 #include <set> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 9 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
10 | 10 |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 if (!print_preview_menu_observer_.get()) { | 630 if (!print_preview_menu_observer_.get()) { |
631 TabContents* tab_contents = | 631 TabContents* tab_contents = |
632 TabContents::FromWebContents(source_web_contents_); | 632 TabContents::FromWebContents(source_web_contents_); |
633 print_preview_menu_observer_.reset( | 633 print_preview_menu_observer_.reset( |
634 new PrintPreviewContextMenuObserver(tab_contents)); | 634 new PrintPreviewContextMenuObserver(tab_contents)); |
635 } | 635 } |
636 observers_.AddObserver(print_preview_menu_observer_.get()); | 636 observers_.AddObserver(print_preview_menu_observer_.get()); |
637 } | 637 } |
638 | 638 |
639 const Extension* RenderViewContextMenu::GetExtension() const { | 639 const Extension* RenderViewContextMenu::GetExtension() const { |
640 ExtensionSystem* system = ExtensionSystem::Get(profile_); | 640 extensions::ExtensionSystem* system = |
| 641 extensions::ExtensionSystem::Get(profile_); |
641 // There is no process manager in some tests. | 642 // There is no process manager in some tests. |
642 if (!system->process_manager()) | 643 if (!system->process_manager()) |
643 return NULL; | 644 return NULL; |
644 | 645 |
645 return system->process_manager()->GetExtensionForRenderViewHost( | 646 return system->process_manager()->GetExtensionForRenderViewHost( |
646 source_web_contents_->GetRenderViewHost()); | 647 source_web_contents_->GetRenderViewHost()); |
647 } | 648 } |
648 | 649 |
649 void RenderViewContextMenu::AppendPlatformAppItems() { | 650 void RenderViewContextMenu::AppendPlatformAppItems() { |
650 const Extension* platform_app = GetExtension(); | 651 const Extension* platform_app = GetExtension(); |
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2004 source_web_contents_->GetRenderViewHost()-> | 2005 source_web_contents_->GetRenderViewHost()-> |
2005 ExecuteMediaPlayerActionAtLocation(location, action); | 2006 ExecuteMediaPlayerActionAtLocation(location, action); |
2006 } | 2007 } |
2007 | 2008 |
2008 void RenderViewContextMenu::PluginActionAt( | 2009 void RenderViewContextMenu::PluginActionAt( |
2009 const gfx::Point& location, | 2010 const gfx::Point& location, |
2010 const WebPluginAction& action) { | 2011 const WebPluginAction& action) { |
2011 source_web_contents_->GetRenderViewHost()-> | 2012 source_web_contents_->GetRenderViewHost()-> |
2012 ExecutePluginActionAtLocation(location, action); | 2013 ExecutePluginActionAtLocation(location, action); |
2013 } | 2014 } |
OLD | NEW |