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

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

Issue 23923010: Move Inspect[BackgroundPage|ExtensionHost] Out of ExtensionService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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 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 13 matching lines...) Expand all
24 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 24 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
25 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" 25 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
26 #include "chrome/browser/autocomplete/autocomplete_match.h" 26 #include "chrome/browser/autocomplete/autocomplete_match.h"
27 #include "chrome/browser/browser_process.h" 27 #include "chrome/browser/browser_process.h"
28 #include "chrome/browser/chrome_notification_types.h" 28 #include "chrome/browser/chrome_notification_types.h"
29 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" 29 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
30 #include "chrome/browser/devtools/devtools_window.h" 30 #include "chrome/browser/devtools/devtools_window.h"
31 #include "chrome/browser/download/download_service.h" 31 #include "chrome/browser/download/download_service.h"
32 #include "chrome/browser/download/download_service_factory.h" 32 #include "chrome/browser/download/download_service_factory.h"
33 #include "chrome/browser/download/download_stats.h" 33 #include "chrome/browser/download/download_stats.h"
34 #include "chrome/browser/extensions/devtools_util.h"
34 #include "chrome/browser/extensions/extension_host.h" 35 #include "chrome/browser/extensions/extension_host.h"
35 #include "chrome/browser/extensions/extension_service.h" 36 #include "chrome/browser/extensions/extension_service.h"
36 #include "chrome/browser/extensions/extension_system.h" 37 #include "chrome/browser/extensions/extension_system.h"
37 #include "chrome/browser/google/google_util.h" 38 #include "chrome/browser/google/google_util.h"
38 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" 39 #include "chrome/browser/plugins/chrome_plugin_service_filter.h"
39 #include "chrome/browser/prefs/incognito_mode_prefs.h" 40 #include "chrome/browser/prefs/incognito_mode_prefs.h"
40 #include "chrome/browser/profiles/profile.h" 41 #include "chrome/browser/profiles/profile.h"
41 #include "chrome/browser/profiles/profile_io_data.h" 42 #include "chrome/browser/profiles/profile_io_data.h"
42 #include "chrome/browser/search/search.h" 43 #include "chrome/browser/search/search.h"
43 #include "chrome/browser/search_engines/search_terms_data.h" 44 #include "chrome/browser/search_engines/search_terms_data.h"
(...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 1785
1785 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: 1786 case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
1786 Inspect(params_.x, params_.y); 1787 Inspect(params_.x, params_.y);
1787 break; 1788 break;
1788 1789
1789 case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE: { 1790 case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE: {
1790 const Extension* platform_app = GetExtension(); 1791 const Extension* platform_app = GetExtension();
1791 DCHECK(platform_app); 1792 DCHECK(platform_app);
1792 DCHECK(platform_app->is_platform_app()); 1793 DCHECK(platform_app->is_platform_app());
1793 1794
1794 extensions::ExtensionSystem::Get(profile_)->extension_service()-> 1795 extensions::devtools_util::InspectBackgroundPage(platform_app, profile_);
1795 InspectBackgroundPage(platform_app);
1796 break; 1796 break;
1797 } 1797 }
1798 1798
1799 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: { 1799 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: {
1800 NavigationController* controller = &source_web_contents_->GetController(); 1800 NavigationController* controller = &source_web_contents_->GetController();
1801 // Important to use GetVisibleEntry to match what's showing in the 1801 // Important to use GetVisibleEntry to match what's showing in the
1802 // omnibox. 1802 // omnibox.
1803 NavigationEntry* nav_entry = controller->GetVisibleEntry(); 1803 NavigationEntry* nav_entry = controller->GetVisibleEntry();
1804 Browser* browser = 1804 Browser* browser =
1805 chrome::FindBrowserWithWebContents(source_web_contents_); 1805 chrome::FindBrowserWithWebContents(source_web_contents_);
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2105 source_web_contents_->GetRenderViewHost()-> 2105 source_web_contents_->GetRenderViewHost()->
2106 ExecuteMediaPlayerActionAtLocation(location, action); 2106 ExecuteMediaPlayerActionAtLocation(location, action);
2107 } 2107 }
2108 2108
2109 void RenderViewContextMenu::PluginActionAt( 2109 void RenderViewContextMenu::PluginActionAt(
2110 const gfx::Point& location, 2110 const gfx::Point& location,
2111 const WebPluginAction& action) { 2111 const WebPluginAction& action) {
2112 source_web_contents_->GetRenderViewHost()-> 2112 source_web_contents_->GetRenderViewHost()->
2113 ExecutePluginActionAtLocation(location, action); 2113 ExecutePluginActionAtLocation(location, action);
2114 } 2114 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/ui/webui/extensions/extension_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698