| 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/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 #include "chrome/browser/shell_integration.h" | 64 #include "chrome/browser/shell_integration.h" |
| 65 #include "chrome/browser/status_icons/status_tray.h" | 65 #include "chrome/browser/status_icons/status_tray.h" |
| 66 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" | 66 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" |
| 67 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" | 67 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" |
| 68 #include "chrome/browser/ui/browser_finder.h" | 68 #include "chrome/browser/ui/browser_finder.h" |
| 69 #include "chrome/browser/web_resource/promo_resource_service.h" | 69 #include "chrome/browser/web_resource/promo_resource_service.h" |
| 70 #include "chrome/common/chrome_constants.h" | 70 #include "chrome/common/chrome_constants.h" |
| 71 #include "chrome/common/chrome_notification_types.h" | 71 #include "chrome/common/chrome_notification_types.h" |
| 72 #include "chrome/common/chrome_paths.h" | 72 #include "chrome/common/chrome_paths.h" |
| 73 #include "chrome/common/chrome_switches.h" | 73 #include "chrome/common/chrome_switches.h" |
| 74 #include "chrome/common/extensions/chrome_manifest_handlers.h" |
| 74 #include "chrome/common/extensions/extension_l10n_util.h" | 75 #include "chrome/common/extensions/extension_l10n_util.h" |
| 75 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" | 76 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" |
| 76 #include "chrome/common/extensions/permissions/permissions_info.h" | 77 #include "chrome/common/extensions/permissions/permissions_info.h" |
| 77 #include "chrome/common/pref_names.h" | 78 #include "chrome/common/pref_names.h" |
| 78 #include "chrome/common/switch_utils.h" | 79 #include "chrome/common/switch_utils.h" |
| 79 #include "chrome/common/url_constants.h" | 80 #include "chrome/common/url_constants.h" |
| 80 #include "chrome/installer/util/google_update_constants.h" | 81 #include "chrome/installer/util/google_update_constants.h" |
| 81 #include "content/public/browser/browser_thread.h" | 82 #include "content/public/browser/browser_thread.h" |
| 82 #include "content/public/browser/child_process_security_policy.h" | 83 #include "content/public/browser/child_process_security_policy.h" |
| 83 #include "content/public/browser/notification_details.h" | 84 #include "content/public/browser/notification_details.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 chrome::kExtensionResourceScheme); | 192 chrome::kExtensionResourceScheme); |
| 192 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( | 193 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( |
| 193 chrome::kChromeSearchScheme); | 194 chrome::kChromeSearchScheme); |
| 194 | 195 |
| 195 #if defined(OS_MACOSX) | 196 #if defined(OS_MACOSX) |
| 196 InitIdleMonitor(); | 197 InitIdleMonitor(); |
| 197 #endif | 198 #endif |
| 198 | 199 |
| 199 extensions::PermissionsInfo::GetInstance()->InitializeWithDelegate( | 200 extensions::PermissionsInfo::GetInstance()->InitializeWithDelegate( |
| 200 extensions::ChromeAPIPermissions()); | 201 extensions::ChromeAPIPermissions()); |
| 202 extensions::RegisterChromeManifestHandlers(); |
| 201 extension_event_router_forwarder_ = new extensions::EventRouterForwarder; | 203 extension_event_router_forwarder_ = new extensions::EventRouterForwarder; |
| 202 ExtensionRendererState::GetInstance()->Init(); | 204 ExtensionRendererState::GetInstance()->Init(); |
| 203 | 205 |
| 204 #if defined(ENABLE_MESSAGE_CENTER) | 206 #if defined(ENABLE_MESSAGE_CENTER) |
| 205 message_center::MessageCenter::Initialize(); | 207 message_center::MessageCenter::Initialize(); |
| 206 #endif | 208 #endif |
| 207 } | 209 } |
| 208 | 210 |
| 209 BrowserProcessImpl::~BrowserProcessImpl() { | 211 BrowserProcessImpl::~BrowserProcessImpl() { |
| 210 tracked_objects::ThreadData::EnsureCleanupWasCalled(4); | 212 tracked_objects::ThreadData::EnsureCleanupWasCalled(4); |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 } | 1063 } |
| 1062 | 1064 |
| 1063 void BrowserProcessImpl::OnAutoupdateTimer() { | 1065 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1064 if (CanAutorestartForUpdate()) { | 1066 if (CanAutorestartForUpdate()) { |
| 1065 DLOG(WARNING) << "Detected update. Restarting browser."; | 1067 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1066 RestartBackgroundInstance(); | 1068 RestartBackgroundInstance(); |
| 1067 } | 1069 } |
| 1068 } | 1070 } |
| 1069 | 1071 |
| 1070 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1072 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |