| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 bool TestingBrowserProcess::IsShuttingDown() { | 191 bool TestingBrowserProcess::IsShuttingDown() { |
| 191 return false; | 192 return false; |
| 192 } | 193 } |
| 193 | 194 |
| 194 printing::PrintJobManager* TestingBrowserProcess::print_job_manager() { | 195 printing::PrintJobManager* TestingBrowserProcess::print_job_manager() { |
| 195 return NULL; | 196 return NULL; |
| 196 } | 197 } |
| 197 | 198 |
| 198 printing::PrintPreviewTabController* | 199 printing::PrintPreviewTabController* |
| 199 TestingBrowserProcess::print_preview_tab_controller() { | 200 TestingBrowserProcess::print_preview_tab_controller() { |
| 200 return NULL; | 201 if (!print_preview_tab_controller_.get()) |
| 202 print_preview_tab_controller_ = new printing::PrintPreviewTabController(); |
| 203 return print_preview_tab_controller_.get(); |
| 201 } | 204 } |
| 202 | 205 |
| 203 printing::BackgroundPrintingManager* | 206 printing::BackgroundPrintingManager* |
| 204 TestingBrowserProcess::background_printing_manager() { | 207 TestingBrowserProcess::background_printing_manager() { |
| 205 if (!background_printing_manager_.get()) { | 208 if (!background_printing_manager_.get()) { |
| 206 background_printing_manager_.reset( | 209 background_printing_manager_.reset( |
| 207 new printing::BackgroundPrintingManager()); | 210 new printing::BackgroundPrintingManager()); |
| 208 } | 211 } |
| 209 return background_printing_manager_.get(); | 212 return background_printing_manager_.get(); |
| 210 } | 213 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 } | 275 } |
| 273 | 276 |
| 274 void TestingBrowserProcess::SetDevToolsManager(DevToolsManager* manager) { | 277 void TestingBrowserProcess::SetDevToolsManager(DevToolsManager* manager) { |
| 275 devtools_manager_.reset(manager); | 278 devtools_manager_.reset(manager); |
| 276 } | 279 } |
| 277 | 280 |
| 278 void TestingBrowserProcess::SetBrowserPolicyConnector( | 281 void TestingBrowserProcess::SetBrowserPolicyConnector( |
| 279 policy::BrowserPolicyConnector* connector) { | 282 policy::BrowserPolicyConnector* connector) { |
| 280 browser_policy_connector_.reset(connector); | 283 browser_policy_connector_.reset(connector); |
| 281 } | 284 } |
| OLD | NEW |