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/test/base/testing_browser_process.h" | 5 #include "chrome/test/base/testing_browser_process.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 23 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
24 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" | 24 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" |
25 #endif | 25 #endif |
26 | 26 |
27 #if defined(ENABLE_CONFIGURATION_POLICY) | 27 #if defined(ENABLE_CONFIGURATION_POLICY) |
28 #include "chrome/browser/policy/browser_policy_connector.h" | 28 #include "chrome/browser/policy/browser_policy_connector.h" |
29 #else | 29 #else |
30 #include "chrome/browser/policy/policy_service_stub.h" | 30 #include "chrome/browser/policy/policy_service_stub.h" |
31 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 31 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
32 | 32 |
| 33 #if defined(ENABLE_MESSAGE_CENTER) |
| 34 #include "ui/message_center/message_center.h" |
| 35 #endif |
| 36 |
33 // static | 37 // static |
34 TestingBrowserProcess* TestingBrowserProcess::GetGlobal() { | 38 TestingBrowserProcess* TestingBrowserProcess::GetGlobal() { |
35 return static_cast<TestingBrowserProcess*>(g_browser_process); | 39 return static_cast<TestingBrowserProcess*>(g_browser_process); |
36 } | 40 } |
37 | 41 |
38 TestingBrowserProcess::TestingBrowserProcess() | 42 TestingBrowserProcess::TestingBrowserProcess() |
39 : notification_service_(content::NotificationService::Create()), | 43 : notification_service_(content::NotificationService::Create()), |
40 module_ref_count_(0), | 44 module_ref_count_(0), |
41 app_locale_("en"), | 45 app_locale_("en"), |
42 #if !defined(OS_IOS) | 46 #if !defined(OS_IOS) |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 if (!notification_ui_manager_.get()) | 185 if (!notification_ui_manager_.get()) |
182 notification_ui_manager_.reset( | 186 notification_ui_manager_.reset( |
183 NotificationUIManager::Create(local_state())); | 187 NotificationUIManager::Create(local_state())); |
184 return notification_ui_manager_.get(); | 188 return notification_ui_manager_.get(); |
185 #else | 189 #else |
186 NOTIMPLEMENTED(); | 190 NOTIMPLEMENTED(); |
187 return NULL; | 191 return NULL; |
188 #endif | 192 #endif |
189 } | 193 } |
190 | 194 |
| 195 message_center::MessageCenter* TestingBrowserProcess::message_center() { |
| 196 #if defined(ENABLE_MESSAGE_CENTER) |
| 197 if (!message_center_.get()) |
| 198 message_center_.reset(new message_center::MessageCenter()); |
| 199 return message_center_.get(); |
| 200 #else |
| 201 NOTIMPLEMENTED(); |
| 202 return NULL; |
| 203 #endif |
| 204 } |
| 205 |
191 IntranetRedirectDetector* TestingBrowserProcess::intranet_redirect_detector() { | 206 IntranetRedirectDetector* TestingBrowserProcess::intranet_redirect_detector() { |
192 return NULL; | 207 return NULL; |
193 } | 208 } |
194 | 209 |
195 AutomationProviderList* TestingBrowserProcess::GetAutomationProviderList() { | 210 AutomationProviderList* TestingBrowserProcess::GetAutomationProviderList() { |
196 return NULL; | 211 return NULL; |
197 } | 212 } |
198 | 213 |
199 void TestingBrowserProcess::CreateDevToolsHttpProtocolHandler( | 214 void TestingBrowserProcess::CreateDevToolsHttpProtocolHandler( |
200 Profile* profile, | 215 Profile* profile, |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 #endif | 375 #endif |
361 } | 376 } |
362 | 377 |
363 void TestingBrowserProcess::SetSafeBrowsingService( | 378 void TestingBrowserProcess::SetSafeBrowsingService( |
364 SafeBrowsingService* sb_service) { | 379 SafeBrowsingService* sb_service) { |
365 #if !defined(OS_IOS) | 380 #if !defined(OS_IOS) |
366 NOTIMPLEMENTED(); | 381 NOTIMPLEMENTED(); |
367 sb_service_ = sb_service; | 382 sb_service_ = sb_service; |
368 #endif | 383 #endif |
369 } | 384 } |
OLD | NEW |