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 26 matching lines...) Expand all Loading... |
37 #include "chrome/browser/extensions/extension_webkit_preferences.h" | 37 #include "chrome/browser/extensions/extension_webkit_preferences.h" |
38 #include "chrome/browser/extensions/message_handler.h" | 38 #include "chrome/browser/extensions/message_handler.h" |
39 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 39 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
40 #include "chrome/browser/google/google_util.h" | 40 #include "chrome/browser/google/google_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/nacl_host/nacl_process_host.h" | 43 #include "chrome/browser/nacl_host/nacl_process_host.h" |
44 #include "chrome/browser/net/chrome_net_log.h" | 44 #include "chrome/browser/net/chrome_net_log.h" |
45 #include "chrome/browser/notifications/desktop_notification_service.h" | 45 #include "chrome/browser/notifications/desktop_notification_service.h" |
46 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 46 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
47 #include "chrome/browser/pepper_gtalk_message_filter.h" | |
48 #include "chrome/browser/platform_util.h" | 47 #include "chrome/browser/platform_util.h" |
49 #include "chrome/browser/prefs/pref_service.h" | 48 #include "chrome/browser/prefs/pref_service.h" |
50 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 49 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
51 #include "chrome/browser/prerender/prerender_manager.h" | 50 #include "chrome/browser/prerender/prerender_manager.h" |
52 #include "chrome/browser/prerender/prerender_manager_factory.h" | 51 #include "chrome/browser/prerender/prerender_manager_factory.h" |
53 #include "chrome/browser/prerender/prerender_message_filter.h" | 52 #include "chrome/browser/prerender/prerender_message_filter.h" |
54 #include "chrome/browser/prerender/prerender_tracker.h" | 53 #include "chrome/browser/prerender/prerender_tracker.h" |
55 #include "chrome/browser/printing/printing_message_filter.h" | 54 #include "chrome/browser/printing/printing_message_filter.h" |
56 #include "chrome/browser/profiles/profile.h" | 55 #include "chrome/browser/profiles/profile.h" |
57 #include "chrome/browser/profiles/profile_io_data.h" | 56 #include "chrome/browser/profiles/profile_io_data.h" |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 | 615 |
617 RendererContentSettingRules rules; | 616 RendererContentSettingRules rules; |
618 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); | 617 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); |
619 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); | 618 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); |
620 | 619 |
621 #if defined(OS_ANDROID) && defined(USE_LINUX_BREAKPAD) | 620 #if defined(OS_ANDROID) && defined(USE_LINUX_BREAKPAD) |
622 InitCrashDumpManager(); | 621 InitCrashDumpManager(); |
623 #endif | 622 #endif |
624 } | 623 } |
625 | 624 |
626 void ChromeContentBrowserClient::BrowserChildProcessHostCreated( | |
627 content::BrowserChildProcessHost* host) { | |
628 host->GetHost()->AddFilter(new PepperGtalkMessageFilter()); | |
629 } | |
630 | |
631 content::WebUIControllerFactory* | 625 content::WebUIControllerFactory* |
632 ChromeContentBrowserClient::GetWebUIControllerFactory() { | 626 ChromeContentBrowserClient::GetWebUIControllerFactory() { |
633 return ChromeWebUIControllerFactory::GetInstance(); | 627 return ChromeWebUIControllerFactory::GetInstance(); |
634 } | 628 } |
635 | 629 |
636 GURL ChromeContentBrowserClient::GetEffectiveURL( | 630 GURL ChromeContentBrowserClient::GetEffectiveURL( |
637 content::BrowserContext* browser_context, const GURL& url) { | 631 content::BrowserContext* browser_context, const GURL& url) { |
638 Profile* profile = Profile::FromBrowserContext(browser_context); | 632 Profile* profile = Profile::FromBrowserContext(browser_context); |
639 // Get the effective URL for the given actual URL. If the URL is part of an | 633 // Get the effective URL for the given actual URL. If the URL is part of an |
640 // installed app, the effective URL is an extension URL with the ID of that | 634 // installed app, the effective URL is an extension URL with the ID of that |
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1934 io_thread_application_locale_ = locale; | 1928 io_thread_application_locale_ = locale; |
1935 } | 1929 } |
1936 | 1930 |
1937 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 1931 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
1938 const std::string& locale) { | 1932 const std::string& locale) { |
1939 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1933 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
1940 io_thread_application_locale_ = locale; | 1934 io_thread_application_locale_ = locale; |
1941 } | 1935 } |
1942 | 1936 |
1943 } // namespace chrome | 1937 } // namespace chrome |
OLD | NEW |