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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 if (!print_preview_menu_observer_.get()) { | 628 if (!print_preview_menu_observer_.get()) { |
629 TabContents* tab_contents = | 629 TabContents* tab_contents = |
630 TabContents::FromWebContents(source_web_contents_); | 630 TabContents::FromWebContents(source_web_contents_); |
631 print_preview_menu_observer_.reset( | 631 print_preview_menu_observer_.reset( |
632 new PrintPreviewContextMenuObserver(tab_contents)); | 632 new PrintPreviewContextMenuObserver(tab_contents)); |
633 } | 633 } |
634 observers_.AddObserver(print_preview_menu_observer_.get()); | 634 observers_.AddObserver(print_preview_menu_observer_.get()); |
635 } | 635 } |
636 | 636 |
637 const Extension* RenderViewContextMenu::GetExtension() const { | 637 const Extension* RenderViewContextMenu::GetExtension() const { |
638 ExtensionSystem* system = ExtensionSystem::Get(profile_); | 638 extensions::ExtensionSystem* system = |
| 639 extensions::ExtensionSystem::Get(profile_); |
639 // There is no process manager in some tests. | 640 // There is no process manager in some tests. |
640 if (!system->process_manager()) | 641 if (!system->process_manager()) |
641 return NULL; | 642 return NULL; |
642 | 643 |
643 return system->process_manager()->GetExtensionForRenderViewHost( | 644 return system->process_manager()->GetExtensionForRenderViewHost( |
644 source_web_contents_->GetRenderViewHost()); | 645 source_web_contents_->GetRenderViewHost()); |
645 } | 646 } |
646 | 647 |
647 void RenderViewContextMenu::AppendPlatformAppItems() { | 648 void RenderViewContextMenu::AppendPlatformAppItems() { |
648 const Extension* platform_app = GetExtension(); | 649 const Extension* platform_app = GetExtension(); |
(...skipping 1355 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 |