| 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 30 matching lines...) Expand all Loading... |
| 41 #include "chrome/browser/google/google_util.h" | 41 #include "chrome/browser/google/google_util.h" |
| 42 #include "chrome/browser/instant/instant_service.h" | 42 #include "chrome/browser/instant/instant_service.h" |
| 43 #include "chrome/browser/instant/instant_service_factory.h" | 43 #include "chrome/browser/instant/instant_service_factory.h" |
| 44 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 44 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 45 #include "chrome/browser/nacl_host/nacl_process_host.h" | 45 #include "chrome/browser/nacl_host/nacl_process_host.h" |
| 46 #include "chrome/browser/net/chrome_net_log.h" | 46 #include "chrome/browser/net/chrome_net_log.h" |
| 47 #include "chrome/browser/notifications/desktop_notification_service.h" | 47 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 48 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 48 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 49 #include "chrome/browser/platform_util.h" | 49 #include "chrome/browser/platform_util.h" |
| 50 #include "chrome/browser/plugins/plugin_info_message_filter.h" | 50 #include "chrome/browser/plugins/plugin_info_message_filter.h" |
| 51 #include "chrome/browser/prefs/pref_registry_syncable.h" |
| 51 #include "chrome/browser/prefs/pref_service.h" | 52 #include "chrome/browser/prefs/pref_service.h" |
| 52 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 53 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 53 #include "chrome/browser/prerender/prerender_manager.h" | 54 #include "chrome/browser/prerender/prerender_manager.h" |
| 54 #include "chrome/browser/prerender/prerender_manager_factory.h" | 55 #include "chrome/browser/prerender/prerender_manager_factory.h" |
| 55 #include "chrome/browser/prerender/prerender_message_filter.h" | 56 #include "chrome/browser/prerender/prerender_message_filter.h" |
| 56 #include "chrome/browser/prerender/prerender_tracker.h" | 57 #include "chrome/browser/prerender/prerender_tracker.h" |
| 57 #include "chrome/browser/printing/printing_message_filter.h" | 58 #include "chrome/browser/printing/printing_message_filter.h" |
| 58 #include "chrome/browser/profiles/profile.h" | 59 #include "chrome/browser/profiles/profile.h" |
| 59 #include "chrome/browser/profiles/profile_io_data.h" | 60 #include "chrome/browser/profiles/profile_io_data.h" |
| 60 #include "chrome/browser/profiles/profile_manager.h" | 61 #include "chrome/browser/profiles/profile_manager.h" |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 | 488 |
| 488 ChromeContentBrowserClient::ChromeContentBrowserClient() { | 489 ChromeContentBrowserClient::ChromeContentBrowserClient() { |
| 489 for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i) | 490 for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i) |
| 490 allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]); | 491 allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]); |
| 491 } | 492 } |
| 492 | 493 |
| 493 ChromeContentBrowserClient::~ChromeContentBrowserClient() { | 494 ChromeContentBrowserClient::~ChromeContentBrowserClient() { |
| 494 } | 495 } |
| 495 | 496 |
| 496 // static | 497 // static |
| 497 void ChromeContentBrowserClient::RegisterUserPrefs(PrefServiceSyncable* prefs) { | 498 void ChromeContentBrowserClient::RegisterUserPrefs( |
| 498 prefs->RegisterBooleanPref(prefs::kDisable3DAPIs, | 499 PrefRegistrySyncable* registry) { |
| 499 false, | 500 registry->RegisterBooleanPref(prefs::kDisable3DAPIs, |
| 500 PrefServiceSyncable::UNSYNCABLE_PREF); | 501 false, |
| 501 prefs->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, | 502 PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 502 true, | 503 registry->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, |
| 503 PrefServiceSyncable::UNSYNCABLE_PREF); | 504 true, |
| 504 prefs->RegisterBooleanPref(prefs::kEnableMemoryInfo, | 505 PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 505 false, | 506 registry->RegisterBooleanPref(prefs::kEnableMemoryInfo, |
| 506 PrefServiceSyncable::UNSYNCABLE_PREF); | 507 false, |
| 508 PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 507 } | 509 } |
| 508 | 510 |
| 509 content::BrowserMainParts* ChromeContentBrowserClient::CreateBrowserMainParts( | 511 content::BrowserMainParts* ChromeContentBrowserClient::CreateBrowserMainParts( |
| 510 const content::MainFunctionParams& parameters) { | 512 const content::MainFunctionParams& parameters) { |
| 511 ChromeBrowserMainParts* main_parts; | 513 ChromeBrowserMainParts* main_parts; |
| 512 // Construct the Main browser parts based on the OS type. | 514 // Construct the Main browser parts based on the OS type. |
| 513 #if defined(OS_WIN) | 515 #if defined(OS_WIN) |
| 514 main_parts = new ChromeBrowserMainPartsWin(parameters); | 516 main_parts = new ChromeBrowserMainPartsWin(parameters); |
| 515 #elif defined(OS_MACOSX) | 517 #elif defined(OS_MACOSX) |
| 516 main_parts = new ChromeBrowserMainPartsMac(parameters); | 518 main_parts = new ChromeBrowserMainPartsMac(parameters); |
| (...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2040 io_thread_application_locale_ = locale; | 2042 io_thread_application_locale_ = locale; |
| 2041 } | 2043 } |
| 2042 | 2044 |
| 2043 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 2045 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
| 2044 const std::string& locale) { | 2046 const std::string& locale) { |
| 2045 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 2047 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 2046 io_thread_application_locale_ = locale; | 2048 io_thread_application_locale_ = locale; |
| 2047 } | 2049 } |
| 2048 | 2050 |
| 2049 } // namespace chrome | 2051 } // namespace chrome |
| OLD | NEW |