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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 7309011: Remove dependencies on extensions from content/browser/debugger. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/values.h"
8 #include "chrome/app/breakpad_mac.h" 9 #include "chrome/app/breakpad_mac.h"
9 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/character_encoding.h" 11 #include "chrome/browser/character_encoding.h"
11 #include "chrome/browser/chrome_plugin_message_filter.h" 12 #include "chrome/browser/chrome_plugin_message_filter.h"
12 #include "chrome/browser/chrome_quota_permission_context.h" 13 #include "chrome/browser/chrome_quota_permission_context.h"
13 #include "chrome/browser/chrome_worker_message_filter.h" 14 #include "chrome/browser/chrome_worker_message_filter.h"
14 #include "chrome/browser/content_settings/host_content_settings_map.h" 15 #include "chrome/browser/content_settings/host_content_settings_map.h"
15 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 16 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
17 #include "chrome/browser/debugger/extension_ports_remote_service.h"
16 #include "chrome/browser/extensions/extension_info_map.h" 18 #include "chrome/browser/extensions/extension_info_map.h"
17 #include "chrome/browser/extensions/extension_message_handler.h" 19 #include "chrome/browser/extensions/extension_message_handler.h"
18 #include "chrome/browser/extensions/extension_service.h" 20 #include "chrome/browser/extensions/extension_service.h"
19 #include "chrome/browser/google/google_util.h" 21 #include "chrome/browser/google/google_util.h"
20 #include "chrome/browser/notifications/desktop_notification_service.h" 22 #include "chrome/browser/notifications/desktop_notification_service.h"
21 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 23 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
22 #include "chrome/browser/platform_util.h" 24 #include "chrome/browser/platform_util.h"
23 #include "chrome/browser/prefs/pref_service.h" 25 #include "chrome/browser/prefs/pref_service.h"
24 #include "chrome/browser/printing/printing_message_filter.h" 26 #include "chrome/browser/printing/printing_message_filter.h"
25 #include "chrome/browser/profiles/profile.h" 27 #include "chrome/browser/profiles/profile.h"
(...skipping 13 matching lines...) Expand all
39 #include "chrome/common/chrome_switches.h" 41 #include "chrome/common/chrome_switches.h"
40 #include "chrome/common/extensions/extension.h" 42 #include "chrome/common/extensions/extension.h"
41 #include "chrome/common/extensions/extension_messages.h" 43 #include "chrome/common/extensions/extension_messages.h"
42 #include "chrome/common/logging_chrome.h" 44 #include "chrome/common/logging_chrome.h"
43 #include "chrome/common/pref_names.h" 45 #include "chrome/common/pref_names.h"
44 #include "chrome/common/render_messages.h" 46 #include "chrome/common/render_messages.h"
45 #include "chrome/common/url_constants.h" 47 #include "chrome/common/url_constants.h"
46 #include "content/browser/browsing_instance.h" 48 #include "content/browser/browsing_instance.h"
47 #include "content/browser/child_process_security_policy.h" 49 #include "content/browser/child_process_security_policy.h"
48 #include "content/browser/debugger/devtools_handler.h" 50 #include "content/browser/debugger/devtools_handler.h"
51 #include "content/browser/debugger/devtools_protocol_handler.h"
49 #include "content/browser/plugin_process_host.h" 52 #include "content/browser/plugin_process_host.h"
50 #include "content/browser/renderer_host/browser_render_process_host.h" 53 #include "content/browser/renderer_host/browser_render_process_host.h"
51 #include "content/browser/renderer_host/render_view_host.h" 54 #include "content/browser/renderer_host/render_view_host.h"
52 #include "content/browser/resource_context.h" 55 #include "content/browser/resource_context.h"
53 #include "content/browser/site_instance.h" 56 #include "content/browser/site_instance.h"
54 #include "content/browser/ssl/ssl_client_auth_handler.h" 57 #include "content/browser/ssl/ssl_client_auth_handler.h"
55 #include "content/browser/tab_contents/tab_contents.h" 58 #include "content/browser/tab_contents/tab_contents.h"
56 #include "content/browser/worker_host/worker_process_host.h" 59 #include "content/browser/worker_host/worker_process_host.h"
57 #include "content/common/bindings_policy.h" 60 #include "content/common/bindings_policy.h"
58 #include "content/common/desktop_notification_messages.h" 61 #include "content/common/desktop_notification_messages.h"
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 598
596 ui::Clipboard* ChromeContentBrowserClient::GetClipboard() { 599 ui::Clipboard* ChromeContentBrowserClient::GetClipboard() {
597 return g_browser_process->clipboard(); 600 return g_browser_process->clipboard();
598 } 601 }
599 602
600 bool ChromeContentBrowserClient::IsFastShutdownPossible() { 603 bool ChromeContentBrowserClient::IsFastShutdownPossible() {
601 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 604 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
602 return !browser_command_line.HasSwitch(switches::kChromeFrame); 605 return !browser_command_line.HasSwitch(switches::kChromeFrame);
603 } 606 }
604 607
608 void ChromeContentBrowserClient::RegisterDevToolsRemoteListeners(
609 DevToolsProtocolHandler* proto_handler) {
610 proto_handler->RegisterDestination(
611 new ExtensionPortsRemoteService(proto_handler),
612 ExtensionPortsRemoteService::kToolName);
613 }
614
615 void ChromeContentBrowserClient::GetAdditionalStartPagesForDevTools(
616 TabContents* dev_tools_tab, ListValue* results) {
617 const ExtensionService* extension_service =
618 dev_tools_tab->profile()->GetOriginalProfile()->GetExtensionService();
619 if (!extension_service)
620 return;
621
622 const ExtensionList* extensions = extension_service->extensions();
623
624 for (ExtensionList::const_iterator extension = extensions->begin();
625 extension != extensions->end(); ++extension) {
626 if ((*extension)->devtools_url().is_empty())
627 continue;
628 DictionaryValue* extension_info = new DictionaryValue();
629 extension_info->Set("startPage",
630 new StringValue((*extension)->devtools_url().spec()));
631 results->Append(extension_info);
632 }
633 }
634
605 #if defined(OS_LINUX) 635 #if defined(OS_LINUX)
606 int ChromeContentBrowserClient::GetCrashSignalFD( 636 int ChromeContentBrowserClient::GetCrashSignalFD(
607 const std::string& process_type) { 637 const std::string& process_type) {
608 if (process_type == switches::kRendererProcess) 638 if (process_type == switches::kRendererProcess)
609 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); 639 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket();
610 640
611 if (process_type == switches::kExtensionProcess) { 641 if (process_type == switches::kExtensionProcess) {
612 ExtensionCrashHandlerHostLinux* crash_handler = 642 ExtensionCrashHandlerHostLinux* crash_handler =
613 ExtensionCrashHandlerHostLinux::GetInstance(); 643 ExtensionCrashHandlerHostLinux::GetInstance();
614 return crash_handler->GetDeathSignalSocket(); 644 return crash_handler->GetDeathSignalSocket();
(...skipping 15 matching lines...) Expand all
630 #if defined(USE_NSS) 660 #if defined(USE_NSS)
631 crypto::CryptoModuleBlockingPasswordDelegate* 661 crypto::CryptoModuleBlockingPasswordDelegate*
632 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 662 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
633 const GURL& url) { 663 const GURL& url) {
634 return browser::NewCryptoModuleBlockingDialogDelegate( 664 return browser::NewCryptoModuleBlockingDialogDelegate(
635 browser::kCryptoModulePasswordKeygen, url.host()); 665 browser::kCryptoModulePasswordKeygen, url.host());
636 } 666 }
637 #endif 667 #endif
638 668
639 } // namespace chrome 669 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/debugger/devtools_extension_debug_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698