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 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/chrome_quota_permission_context.h" | 22 #include "chrome/browser/chrome_quota_permission_context.h" |
23 #include "chrome/browser/content_settings/content_settings_utils.h" | 23 #include "chrome/browser/content_settings/content_settings_utils.h" |
24 #include "chrome/browser/content_settings/cookie_settings.h" | 24 #include "chrome/browser/content_settings/cookie_settings.h" |
25 #include "chrome/browser/content_settings/host_content_settings_map.h" | 25 #include "chrome/browser/content_settings/host_content_settings_map.h" |
26 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 26 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
27 #include "chrome/browser/defaults.h" | 27 #include "chrome/browser/defaults.h" |
28 #include "chrome/browser/download/download_util.h" | 28 #include "chrome/browser/download/download_util.h" |
29 #include "chrome/browser/extensions/api/web_request/web_request_api.h" | 29 #include "chrome/browser/extensions/api/web_request/web_request_api.h" |
30 #include "chrome/browser/extensions/extension_host.h" | 30 #include "chrome/browser/extensions/extension_host.h" |
31 #include "chrome/browser/extensions/extension_info_map.h" | 31 #include "chrome/browser/extensions/extension_info_map.h" |
32 #include "chrome/browser/extensions/extension_message_handler.h" | |
33 #include "chrome/browser/extensions/extension_process_manager.h" | 32 #include "chrome/browser/extensions/extension_process_manager.h" |
34 #include "chrome/browser/extensions/extension_service.h" | 33 #include "chrome/browser/extensions/extension_service.h" |
35 #include "chrome/browser/extensions/extension_system.h" | 34 #include "chrome/browser/extensions/extension_system.h" |
36 #include "chrome/browser/extensions/extension_web_ui.h" | 35 #include "chrome/browser/extensions/extension_web_ui.h" |
37 #include "chrome/browser/extensions/extension_webkit_preferences.h" | 36 #include "chrome/browser/extensions/extension_webkit_preferences.h" |
| 37 #include "chrome/browser/extensions/message_handler.h" |
38 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 38 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
39 #include "chrome/browser/google/google_util.h" | 39 #include "chrome/browser/google/google_util.h" |
40 #include "chrome/browser/gpu_util.h" | 40 #include "chrome/browser/gpu_util.h" |
41 #include "chrome/browser/infobars/infobar_tab_helper.h" | 41 #include "chrome/browser/infobars/infobar_tab_helper.h" |
42 #include "chrome/browser/media/media_internals.h" | 42 #include "chrome/browser/media/media_internals.h" |
43 #include "chrome/browser/net/chrome_net_log.h" | 43 #include "chrome/browser/net/chrome_net_log.h" |
44 #include "chrome/browser/notifications/desktop_notification_service.h" | 44 #include "chrome/browser/notifications/desktop_notification_service.h" |
45 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 45 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
46 #include "chrome/browser/pepper_gtalk_message_filter.h" | 46 #include "chrome/browser/pepper_gtalk_message_filter.h" |
47 #include "chrome/browser/platform_util.h" | 47 #include "chrome/browser/platform_util.h" |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 | 431 |
432 void ChromeContentBrowserClient::RenderViewHostCreated( | 432 void ChromeContentBrowserClient::RenderViewHostCreated( |
433 RenderViewHost* render_view_host) { | 433 RenderViewHost* render_view_host) { |
434 | 434 |
435 SiteInstance* site_instance = render_view_host->GetSiteInstance(); | 435 SiteInstance* site_instance = render_view_host->GetSiteInstance(); |
436 Profile* profile = Profile::FromBrowserContext( | 436 Profile* profile = Profile::FromBrowserContext( |
437 site_instance->GetBrowserContext()); | 437 site_instance->GetBrowserContext()); |
438 | 438 |
439 new ChromeRenderViewHostObserver(render_view_host, | 439 new ChromeRenderViewHostObserver(render_view_host, |
440 profile->GetNetworkPredictor()); | 440 profile->GetNetworkPredictor()); |
441 new ExtensionMessageHandler(render_view_host); | 441 new extensions::MessageHandler(render_view_host); |
442 } | 442 } |
443 | 443 |
444 void ChromeContentBrowserClient::RenderProcessHostCreated( | 444 void ChromeContentBrowserClient::RenderProcessHostCreated( |
445 content::RenderProcessHost* host) { | 445 content::RenderProcessHost* host) { |
446 int id = host->GetID(); | 446 int id = host->GetID(); |
447 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); | 447 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); |
448 host->GetChannel()->AddFilter(new ChromeRenderMessageFilter( | 448 host->GetChannel()->AddFilter(new ChromeRenderMessageFilter( |
449 id, profile, profile->GetRequestContextForRenderProcess(id))); | 449 id, profile, profile->GetRequestContextForRenderProcess(id))); |
450 host->GetChannel()->AddFilter(new PluginInfoMessageFilter(id, profile)); | 450 host->GetChannel()->AddFilter(new PluginInfoMessageFilter(id, profile)); |
451 #if defined(ENABLE_PRINTING) | 451 #if defined(ENABLE_PRINTING) |
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1666 io_thread_application_locale_ = locale; | 1666 io_thread_application_locale_ = locale; |
1667 } | 1667 } |
1668 | 1668 |
1669 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 1669 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
1670 const std::string& locale) { | 1670 const std::string& locale) { |
1671 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1671 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
1672 io_thread_application_locale_ = locale; | 1672 io_thread_application_locale_ = locale; |
1673 } | 1673 } |
1674 | 1674 |
1675 } // namespace chrome | 1675 } // namespace chrome |
OLD | NEW |