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 "chrome/browser/notifications/notification_ui_manager.h" | 8 #include "chrome/browser/notifications/notification_ui_manager.h" |
9 #include "chrome/browser/policy/browser_policy_connector.h" | 9 #include "chrome/browser/policy/browser_policy_connector.h" |
10 #include "chrome/browser/policy/policy_service.h" | 10 #include "chrome/browser/policy/policy_service.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 bool TestingBrowserProcess::IsShuttingDown() { | 181 bool TestingBrowserProcess::IsShuttingDown() { |
182 return false; | 182 return false; |
183 } | 183 } |
184 | 184 |
185 printing::PrintJobManager* TestingBrowserProcess::print_job_manager() { | 185 printing::PrintJobManager* TestingBrowserProcess::print_job_manager() { |
186 return NULL; | 186 return NULL; |
187 } | 187 } |
188 | 188 |
189 printing::PrintPreviewTabController* | 189 printing::PrintPreviewTabController* |
190 TestingBrowserProcess::print_preview_tab_controller() { | 190 TestingBrowserProcess::print_preview_tab_controller() { |
191 #if defined(OS_ANDROID) | 191 #if defined(ENABLE_PRINTING) |
192 NOTIMPLEMENTED(); | |
193 return NULL; | |
194 #else | |
195 if (!print_preview_tab_controller_.get()) | 192 if (!print_preview_tab_controller_.get()) |
196 print_preview_tab_controller_ = new printing::PrintPreviewTabController(); | 193 print_preview_tab_controller_ = new printing::PrintPreviewTabController(); |
197 return print_preview_tab_controller_.get(); | 194 return print_preview_tab_controller_.get(); |
| 195 #else |
| 196 NOTIMPLEMENTED(); |
| 197 return NULL; |
198 #endif | 198 #endif |
199 } | 199 } |
200 | 200 |
201 printing::BackgroundPrintingManager* | 201 printing::BackgroundPrintingManager* |
202 TestingBrowserProcess::background_printing_manager() { | 202 TestingBrowserProcess::background_printing_manager() { |
203 #if defined(OS_ANDROID) | 203 #if defined(ENABLE_PRINTING) |
204 NOTIMPLEMENTED(); | |
205 return NULL; | |
206 #else | |
207 if (!background_printing_manager_.get()) { | 204 if (!background_printing_manager_.get()) { |
208 background_printing_manager_.reset( | 205 background_printing_manager_.reset( |
209 new printing::BackgroundPrintingManager()); | 206 new printing::BackgroundPrintingManager()); |
210 } | 207 } |
211 return background_printing_manager_.get(); | 208 return background_printing_manager_.get(); |
| 209 #else |
| 210 NOTIMPLEMENTED(); |
| 211 return NULL; |
212 #endif | 212 #endif |
213 } | 213 } |
214 | 214 |
215 const std::string& TestingBrowserProcess::GetApplicationLocale() { | 215 const std::string& TestingBrowserProcess::GetApplicationLocale() { |
216 return app_locale_; | 216 return app_locale_; |
217 } | 217 } |
218 | 218 |
219 void TestingBrowserProcess::SetApplicationLocale( | 219 void TestingBrowserProcess::SetApplicationLocale( |
220 const std::string& app_locale) { | 220 const std::string& app_locale) { |
221 app_locale_ = app_locale; | 221 app_locale_ = app_locale; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 263 |
264 void TestingBrowserProcess::SetBrowserPolicyConnector( | 264 void TestingBrowserProcess::SetBrowserPolicyConnector( |
265 policy::BrowserPolicyConnector* connector) { | 265 policy::BrowserPolicyConnector* connector) { |
266 browser_policy_connector_.reset(connector); | 266 browser_policy_connector_.reset(connector); |
267 } | 267 } |
268 | 268 |
269 void TestingBrowserProcess::SetSafeBrowsingService( | 269 void TestingBrowserProcess::SetSafeBrowsingService( |
270 SafeBrowsingService* sb_service) { | 270 SafeBrowsingService* sb_service) { |
271 sb_service_ = sb_service; | 271 sb_service_ = sb_service; |
272 } | 272 } |
OLD | NEW |