OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/google/google_url_tracker.h" | 8 #include "chrome/browser/google/google_url_tracker.h" |
9 #include "chrome/browser/notifications/notification_ui_manager.h" | 9 #include "chrome/browser/notifications/notification_ui_manager.h" |
10 #include "chrome/browser/policy/browser_policy_connector.h" | 10 #include "chrome/browser/policy/browser_policy_connector.h" |
11 #include "chrome/browser/prefs/pref_service.h" | 11 #include "chrome/browser/prefs/pref_service.h" |
12 #include "chrome/browser/prerender/prerender_tracker.h" | 12 #include "chrome/browser/prerender/prerender_tracker.h" |
13 #include "chrome/browser/printing/background_printing_manager.h" | 13 #include "chrome/browser/printing/background_printing_manager.h" |
14 #include "chrome/browser/printing/print_preview_tab_controller.h" | 14 #include "chrome/browser/printing/print_preview_tab_controller.h" |
15 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
16 #include "content/browser/debugger/devtools_manager.h" | |
17 #include "net/url_request/url_request_context_getter.h" | 16 #include "net/url_request/url_request_context_getter.h" |
18 #include "ui/base/clipboard/clipboard.h" | 17 #include "ui/base/clipboard/clipboard.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
20 | 19 |
21 TestingBrowserProcess::TestingBrowserProcess() | 20 TestingBrowserProcess::TestingBrowserProcess() |
22 : module_ref_count_(0), | 21 : module_ref_count_(0), |
23 app_locale_("en"), | 22 app_locale_("en"), |
24 local_state_(NULL), | 23 local_state_(NULL), |
25 io_thread_(NULL), | 24 io_thread_(NULL) { |
26 devtools_manager_(NULL) { | |
27 } | 25 } |
28 | 26 |
29 TestingBrowserProcess::~TestingBrowserProcess() { | 27 TestingBrowserProcess::~TestingBrowserProcess() { |
30 EXPECT_FALSE(local_state_); | 28 EXPECT_FALSE(local_state_); |
31 } | 29 } |
32 | 30 |
33 void TestingBrowserProcess::EndSession() { | 31 void TestingBrowserProcess::EndSession() { |
34 } | 32 } |
35 | 33 |
36 ResourceDispatcherHost* TestingBrowserProcess::resource_dispatcher_host() { | 34 ResourceDispatcherHost* TestingBrowserProcess::resource_dispatcher_host() { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 89 } |
92 | 90 |
93 IconManager* TestingBrowserProcess::icon_manager() { | 91 IconManager* TestingBrowserProcess::icon_manager() { |
94 return NULL; | 92 return NULL; |
95 } | 93 } |
96 | 94 |
97 ThumbnailGenerator* TestingBrowserProcess::GetThumbnailGenerator() { | 95 ThumbnailGenerator* TestingBrowserProcess::GetThumbnailGenerator() { |
98 return NULL; | 96 return NULL; |
99 } | 97 } |
100 | 98 |
101 DevToolsManager* TestingBrowserProcess::devtools_manager() { | |
102 return devtools_manager_.get(); | |
103 } | |
104 | |
105 SidebarManager* TestingBrowserProcess::sidebar_manager() { | 99 SidebarManager* TestingBrowserProcess::sidebar_manager() { |
106 return NULL; | 100 return NULL; |
107 } | 101 } |
108 | 102 |
109 TabCloseableStateWatcher* TestingBrowserProcess::tab_closeable_state_watcher() { | 103 TabCloseableStateWatcher* TestingBrowserProcess::tab_closeable_state_watcher() { |
110 return NULL; | 104 return NULL; |
111 } | 105 } |
112 | 106 |
113 BackgroundModeManager* TestingBrowserProcess::background_mode_manager() { | 107 BackgroundModeManager* TestingBrowserProcess::background_mode_manager() { |
114 return NULL; | 108 return NULL; |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 261 |
268 void TestingBrowserProcess::SetGoogleURLTracker( | 262 void TestingBrowserProcess::SetGoogleURLTracker( |
269 GoogleURLTracker* google_url_tracker) { | 263 GoogleURLTracker* google_url_tracker) { |
270 google_url_tracker_.reset(google_url_tracker); | 264 google_url_tracker_.reset(google_url_tracker); |
271 } | 265 } |
272 | 266 |
273 void TestingBrowserProcess::SetIOThread(IOThread* io_thread) { | 267 void TestingBrowserProcess::SetIOThread(IOThread* io_thread) { |
274 io_thread_ = io_thread; | 268 io_thread_ = io_thread; |
275 } | 269 } |
276 | 270 |
277 void TestingBrowserProcess::SetDevToolsManager(DevToolsManager* manager) { | |
278 devtools_manager_.reset(manager); | |
279 } | |
280 | |
281 void TestingBrowserProcess::SetBrowserPolicyConnector( | 271 void TestingBrowserProcess::SetBrowserPolicyConnector( |
282 policy::BrowserPolicyConnector* connector) { | 272 policy::BrowserPolicyConnector* connector) { |
283 browser_policy_connector_.reset(connector); | 273 browser_policy_connector_.reset(connector); |
284 } | 274 } |
OLD | NEW |