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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "chrome/browser/extensions/suggest_permission_util.h" | 42 #include "chrome/browser/extensions/suggest_permission_util.h" |
43 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 43 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
44 #include "chrome/browser/google/google_util.h" | 44 #include "chrome/browser/google/google_util.h" |
45 #include "chrome/browser/guestview/adview/adview_guest.h" | 45 #include "chrome/browser/guestview/adview/adview_guest.h" |
46 #include "chrome/browser/guestview/guestview.h" | 46 #include "chrome/browser/guestview/guestview.h" |
47 #include "chrome/browser/guestview/guestview_constants.h" | 47 #include "chrome/browser/guestview/guestview_constants.h" |
48 #include "chrome/browser/guestview/webview/webview_guest.h" | 48 #include "chrome/browser/guestview/webview/webview_guest.h" |
49 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 49 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
50 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" | 50 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" |
51 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 51 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
52 #include "chrome/browser/nacl_host/nacl_host_message_filter.h" | |
53 #include "chrome/browser/nacl_host/nacl_process_host.h" | |
54 #include "chrome/browser/net/chrome_net_log.h" | 52 #include "chrome/browser/net/chrome_net_log.h" |
55 #include "chrome/browser/notifications/desktop_notification_service.h" | 53 #include "chrome/browser/notifications/desktop_notification_service.h" |
56 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 54 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
57 #include "chrome/browser/platform_util.h" | 55 #include "chrome/browser/platform_util.h" |
58 #include "chrome/browser/plugins/plugin_info_message_filter.h" | 56 #include "chrome/browser/plugins/plugin_info_message_filter.h" |
59 #include "chrome/browser/prerender/prerender_final_status.h" | 57 #include "chrome/browser/prerender/prerender_final_status.h" |
60 #include "chrome/browser/prerender/prerender_manager.h" | 58 #include "chrome/browser/prerender/prerender_manager.h" |
61 #include "chrome/browser/prerender/prerender_manager_factory.h" | 59 #include "chrome/browser/prerender/prerender_manager_factory.h" |
62 #include "chrome/browser/prerender/prerender_message_filter.h" | 60 #include "chrome/browser/prerender/prerender_message_filter.h" |
63 #include "chrome/browser/prerender/prerender_tracker.h" | 61 #include "chrome/browser/prerender/prerender_tracker.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 #include "chrome/common/extensions/permissions/socket_permission.h" | 96 #include "chrome/common/extensions/permissions/socket_permission.h" |
99 #include "chrome/common/extensions/web_accessible_resources_handler.h" | 97 #include "chrome/common/extensions/web_accessible_resources_handler.h" |
100 #include "chrome/common/logging_chrome.h" | 98 #include "chrome/common/logging_chrome.h" |
101 #include "chrome/common/pepper_permission_util.h" | 99 #include "chrome/common/pepper_permission_util.h" |
102 #include "chrome/common/pref_names.h" | 100 #include "chrome/common/pref_names.h" |
103 #include "chrome/common/render_messages.h" | 101 #include "chrome/common/render_messages.h" |
104 #include "chrome/common/url_constants.h" | 102 #include "chrome/common/url_constants.h" |
105 #include "chrome/installer/util/google_update_settings.h" | 103 #include "chrome/installer/util/google_update_settings.h" |
106 #include "chromeos/chromeos_constants.h" | 104 #include "chromeos/chromeos_constants.h" |
107 #include "components/nacl/browser/nacl_browser.h" | 105 #include "components/nacl/browser/nacl_browser.h" |
| 106 #include "components/nacl/browser/nacl_host_message_filter.h" |
| 107 #include "components/nacl/browser/nacl_process_host.h" |
108 #include "components/nacl/common/nacl_process_type.h" | 108 #include "components/nacl/common/nacl_process_type.h" |
109 #include "components/translate/common/translate_switches.h" | 109 #include "components/translate/common/translate_switches.h" |
110 #include "components/user_prefs/pref_registry_syncable.h" | 110 #include "components/user_prefs/pref_registry_syncable.h" |
111 #include "content/public/browser/browser_child_process_host.h" | 111 #include "content/public/browser/browser_child_process_host.h" |
112 #include "content/public/browser/browser_main_parts.h" | 112 #include "content/public/browser/browser_main_parts.h" |
113 #include "content/public/browser/browser_ppapi_host.h" | 113 #include "content/public/browser/browser_ppapi_host.h" |
114 #include "content/public/browser/browser_thread.h" | 114 #include "content/public/browser/browser_thread.h" |
115 #include "content/public/browser/browser_url_handler.h" | 115 #include "content/public/browser/browser_url_handler.h" |
116 #include "content/public/browser/child_process_data.h" | 116 #include "content/public/browser/child_process_data.h" |
117 #include "content/public/browser/child_process_security_policy.h" | 117 #include "content/public/browser/child_process_security_policy.h" |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 host->AddFilter(new ValidationMessageMessageFilter(id)); | 921 host->AddFilter(new ValidationMessageMessageFilter(id)); |
922 host->AddFilter(new TtsMessageFilter(id, profile)); | 922 host->AddFilter(new TtsMessageFilter(id, profile)); |
923 #if defined(ENABLE_WEBRTC) | 923 #if defined(ENABLE_WEBRTC) |
924 WebRtcLoggingHandlerHost* webrtc_logging_handler_host = | 924 WebRtcLoggingHandlerHost* webrtc_logging_handler_host = |
925 new WebRtcLoggingHandlerHost(profile); | 925 new WebRtcLoggingHandlerHost(profile); |
926 host->AddFilter(webrtc_logging_handler_host); | 926 host->AddFilter(webrtc_logging_handler_host); |
927 host->SetUserData(host, new base::UserDataAdapter<WebRtcLoggingHandlerHost>( | 927 host->SetUserData(host, new base::UserDataAdapter<WebRtcLoggingHandlerHost>( |
928 webrtc_logging_handler_host)); | 928 webrtc_logging_handler_host)); |
929 #endif | 929 #endif |
930 #if !defined(DISABLE_NACL) | 930 #if !defined(DISABLE_NACL) |
931 host->AddFilter(new NaClHostMessageFilter( | 931 host->AddFilter(new nacl::NaClHostMessageFilter( |
932 id, profile->IsOffTheRecord(), | 932 id, profile->IsOffTheRecord(), |
933 profile->GetPath(), | 933 profile->GetPath(), |
934 context)); | 934 context)); |
935 #endif | 935 #endif |
936 #if defined(OS_ANDROID) | 936 #if defined(OS_ANDROID) |
937 host->AddFilter(new EncryptedMediaMessageFilterAndroid()); | 937 host->AddFilter(new EncryptedMediaMessageFilterAndroid()); |
938 #endif | 938 #endif |
939 | 939 |
940 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( | 940 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( |
941 profile->IsOffTheRecord())); | 941 profile->IsOffTheRecord())); |
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2378 scoped_ptr<ppapi::host::HostFactory>( | 2378 scoped_ptr<ppapi::host::HostFactory>( |
2379 new ChromeBrowserPepperHostFactory(browser_host))); | 2379 new ChromeBrowserPepperHostFactory(browser_host))); |
2380 #endif | 2380 #endif |
2381 } | 2381 } |
2382 | 2382 |
2383 content::BrowserPpapiHost* | 2383 content::BrowserPpapiHost* |
2384 ChromeContentBrowserClient::GetExternalBrowserPpapiHost( | 2384 ChromeContentBrowserClient::GetExternalBrowserPpapiHost( |
2385 int plugin_process_id) { | 2385 int plugin_process_id) { |
2386 BrowserChildProcessHostIterator iter(PROCESS_TYPE_NACL_LOADER); | 2386 BrowserChildProcessHostIterator iter(PROCESS_TYPE_NACL_LOADER); |
2387 while (!iter.Done()) { | 2387 while (!iter.Done()) { |
2388 NaClProcessHost* host = static_cast<NaClProcessHost*>(iter.GetDelegate()); | 2388 nacl::NaClProcessHost* host = static_cast<nacl::NaClProcessHost*>( |
| 2389 iter.GetDelegate()); |
2389 if (host->process() && | 2390 if (host->process() && |
2390 host->process()->GetData().id == plugin_process_id) { | 2391 host->process()->GetData().id == plugin_process_id) { |
2391 // Found the plugin. | 2392 // Found the plugin. |
2392 return host->browser_ppapi_host(); | 2393 return host->browser_ppapi_host(); |
2393 } | 2394 } |
2394 ++iter; | 2395 ++iter; |
2395 } | 2396 } |
2396 return NULL; | 2397 return NULL; |
2397 } | 2398 } |
2398 | 2399 |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2629 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, | 2630 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
2630 allowed_file_handle_origins_) || | 2631 allowed_file_handle_origins_) || |
2631 IsHostAllowedByCommandLine(url, extension_set, | 2632 IsHostAllowedByCommandLine(url, extension_set, |
2632 switches::kAllowNaClFileHandleAPI); | 2633 switches::kAllowNaClFileHandleAPI); |
2633 #else | 2634 #else |
2634 return false; | 2635 return false; |
2635 #endif | 2636 #endif |
2636 } | 2637 } |
2637 | 2638 |
2638 } // namespace chrome | 2639 } // namespace chrome |
OLD | NEW |