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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 24 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
25 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 25 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
26 #include "chrome/browser/character_encoding.h" | 26 #include "chrome/browser/character_encoding.h" |
27 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" | 27 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" |
28 #include "chrome/browser/chrome_quota_permission_context.h" | 28 #include "chrome/browser/chrome_quota_permission_context.h" |
29 #include "chrome/browser/content_settings/content_settings_utils.h" | 29 #include "chrome/browser/content_settings/content_settings_utils.h" |
30 #include "chrome/browser/content_settings/cookie_settings.h" | 30 #include "chrome/browser/content_settings/cookie_settings.h" |
31 #include "chrome/browser/content_settings/host_content_settings_map.h" | 31 #include "chrome/browser/content_settings/host_content_settings_map.h" |
32 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 32 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
33 #include "chrome/browser/defaults.h" | 33 #include "chrome/browser/defaults.h" |
| 34 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" |
34 #include "chrome/browser/download/download_prefs.h" | 35 #include "chrome/browser/download/download_prefs.h" |
35 #include "chrome/browser/extensions/api/web_request/web_request_api.h" | 36 #include "chrome/browser/extensions/api/web_request/web_request_api.h" |
36 #include "chrome/browser/extensions/browser_permissions_policy_delegate.h" | 37 #include "chrome/browser/extensions/browser_permissions_policy_delegate.h" |
37 #include "chrome/browser/extensions/extension_service.h" | 38 #include "chrome/browser/extensions/extension_service.h" |
38 #include "chrome/browser/extensions/extension_util.h" | 39 #include "chrome/browser/extensions/extension_util.h" |
39 #include "chrome/browser/extensions/extension_web_ui.h" | 40 #include "chrome/browser/extensions/extension_web_ui.h" |
40 #include "chrome/browser/extensions/extension_webkit_preferences.h" | 41 #include "chrome/browser/extensions/extension_webkit_preferences.h" |
41 #include "chrome/browser/extensions/suggest_permission_util.h" | 42 #include "chrome/browser/extensions/suggest_permission_util.h" |
42 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 43 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
43 #include "chrome/browser/google/google_util.h" | 44 #include "chrome/browser/google/google_util.h" |
(...skipping 2647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2691 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); | 2692 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
2692 // Allow dev channel APIs to be used on "Canary", "Dev", and "Unknown" | 2693 // Allow dev channel APIs to be used on "Canary", "Dev", and "Unknown" |
2693 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on | 2694 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on |
2694 // Chromium builds as well. | 2695 // Chromium builds as well. |
2695 return channel <= chrome::VersionInfo::CHANNEL_DEV; | 2696 return channel <= chrome::VersionInfo::CHANNEL_DEV; |
2696 #else | 2697 #else |
2697 return false; | 2698 return false; |
2698 #endif | 2699 #endif |
2699 } | 2700 } |
2700 | 2701 |
| 2702 content::DevToolsManagerDelegate* |
| 2703 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { |
| 2704 return new ChromeDevToolsManagerDelegate(); |
| 2705 } |
| 2706 |
2701 #if defined(ENABLE_WEBRTC) | 2707 #if defined(ENABLE_WEBRTC) |
2702 void ChromeContentBrowserClient::MaybeCopyDisableWebRtcEncryptionSwitch( | 2708 void ChromeContentBrowserClient::MaybeCopyDisableWebRtcEncryptionSwitch( |
2703 CommandLine* to_command_line, | 2709 CommandLine* to_command_line, |
2704 const CommandLine& from_command_line, | 2710 const CommandLine& from_command_line, |
2705 VersionInfo::Channel channel) { | 2711 VersionInfo::Channel channel) { |
2706 #if defined(OS_ANDROID) | 2712 #if defined(OS_ANDROID) |
2707 const VersionInfo::Channel kMaxDisableEncryptionChannel = | 2713 const VersionInfo::Channel kMaxDisableEncryptionChannel = |
2708 VersionInfo::CHANNEL_BETA; | 2714 VersionInfo::CHANNEL_BETA; |
2709 #else | 2715 #else |
2710 const VersionInfo::Channel kMaxDisableEncryptionChannel = | 2716 const VersionInfo::Channel kMaxDisableEncryptionChannel = |
2711 VersionInfo::CHANNEL_DEV; | 2717 VersionInfo::CHANNEL_DEV; |
2712 #endif | 2718 #endif |
2713 if (channel <= kMaxDisableEncryptionChannel) { | 2719 if (channel <= kMaxDisableEncryptionChannel) { |
2714 static const char* const kWebRtcDevSwitchNames[] = { | 2720 static const char* const kWebRtcDevSwitchNames[] = { |
2715 switches::kDisableWebRtcEncryption, | 2721 switches::kDisableWebRtcEncryption, |
2716 }; | 2722 }; |
2717 to_command_line->CopySwitchesFrom(from_command_line, | 2723 to_command_line->CopySwitchesFrom(from_command_line, |
2718 kWebRtcDevSwitchNames, | 2724 kWebRtcDevSwitchNames, |
2719 arraysize(kWebRtcDevSwitchNames)); | 2725 arraysize(kWebRtcDevSwitchNames)); |
2720 } | 2726 } |
2721 } | 2727 } |
2722 #endif // defined(ENABLE_WEBRTC) | 2728 #endif // defined(ENABLE_WEBRTC) |
2723 | 2729 |
2724 } // namespace chrome | 2730 } // namespace chrome |
OLD | NEW |