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/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
15 #include "content/browser/debugger/devtools_manager.h" | 16 #include "content/browser/debugger/devtools_manager.h" |
16 #include "net/url_request/url_request_context_getter.h" | 17 #include "net/url_request/url_request_context_getter.h" |
17 #include "ui/base/clipboard/clipboard.h" | 18 #include "ui/base/clipboard/clipboard.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
19 | 20 |
20 TestingBrowserProcess::TestingBrowserProcess() | 21 TestingBrowserProcess::TestingBrowserProcess() |
21 : module_ref_count_(0), | 22 : module_ref_count_(0), |
22 app_locale_("en"), | 23 app_locale_("en"), |
23 local_state_(NULL), | 24 local_state_(NULL), |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 bool TestingBrowserProcess::IsShuttingDown() { | 192 bool TestingBrowserProcess::IsShuttingDown() { |
192 return false; | 193 return false; |
193 } | 194 } |
194 | 195 |
195 printing::PrintJobManager* TestingBrowserProcess::print_job_manager() { | 196 printing::PrintJobManager* TestingBrowserProcess::print_job_manager() { |
196 return NULL; | 197 return NULL; |
197 } | 198 } |
198 | 199 |
199 printing::PrintPreviewTabController* | 200 printing::PrintPreviewTabController* |
200 TestingBrowserProcess::print_preview_tab_controller() { | 201 TestingBrowserProcess::print_preview_tab_controller() { |
201 return NULL; | 202 if (!print_preview_tab_controller_.get()) { |
kmadhusu
2011/08/31 21:59:17
{} is not required.
Lei Zhang
2011/08/31 23:24:04
Done.
| |
203 print_preview_tab_controller_ = new printing::PrintPreviewTabController(); | |
204 } | |
205 return print_preview_tab_controller_.get(); | |
202 } | 206 } |
203 | 207 |
204 printing::BackgroundPrintingManager* | 208 printing::BackgroundPrintingManager* |
205 TestingBrowserProcess::background_printing_manager() { | 209 TestingBrowserProcess::background_printing_manager() { |
206 if (!background_printing_manager_.get()) { | 210 if (!background_printing_manager_.get()) { |
207 background_printing_manager_.reset( | 211 background_printing_manager_.reset( |
208 new printing::BackgroundPrintingManager()); | 212 new printing::BackgroundPrintingManager()); |
209 } | 213 } |
210 return background_printing_manager_.get(); | 214 return background_printing_manager_.get(); |
211 } | 215 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
264 google_url_tracker_.reset(google_url_tracker); | 268 google_url_tracker_.reset(google_url_tracker); |
265 } | 269 } |
266 | 270 |
267 void TestingBrowserProcess::SetIOThread(IOThread* io_thread) { | 271 void TestingBrowserProcess::SetIOThread(IOThread* io_thread) { |
268 io_thread_ = io_thread; | 272 io_thread_ = io_thread; |
269 } | 273 } |
270 | 274 |
271 void TestingBrowserProcess::SetDevToolsManager(DevToolsManager* manager) { | 275 void TestingBrowserProcess::SetDevToolsManager(DevToolsManager* manager) { |
272 devtools_manager_.reset(manager); | 276 devtools_manager_.reset(manager); |
273 } | 277 } |
OLD | NEW |