diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-07 02:01:39 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-07 02:01:39 +0000 |
commit | 68f88b99c791834d90017decb2b49f79c8905dc3 (patch) | |
tree | f8ce3679255ce6f854a2b58fd3b058142f10a41c /chrome/test | |
parent | da4491a5648dcb58b5337202ff0546b08c9ffb37 (diff) | |
download | chromium_src-68f88b99c791834d90017decb2b49f79c8905dc3.zip chromium_src-68f88b99c791834d90017decb2b49f79c8905dc3.tar.gz chromium_src-68f88b99c791834d90017decb2b49f79c8905dc3.tar.bz2 |
Print Preview: Print in the background.
BUG=79531
TEST=Print preview tab closes print button is pressed. Printing succeeds.
Review URL: http://codereview.chromium.org/6930034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84539 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/testing_browser_process.cc | 12 | ||||
-rw-r--r-- | chrome/test/testing_browser_process.h | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/chrome/test/testing_browser_process.cc b/chrome/test/testing_browser_process.cc index f0aacad..15db0be 100644 --- a/chrome/test/testing_browser_process.cc +++ b/chrome/test/testing_browser_process.cc @@ -13,6 +13,7 @@ #include "chrome/browser/policy/configuration_policy_provider.h" #include "chrome/browser/policy/dummy_configuration_policy_provider.h" #include "chrome/browser/prefs/pref_service.h" +#include "chrome/browser/printing/background_printing_manager.h" #include "chrome/browser/profiles/profile_manager.h" #include "net/url_request/url_request_context_getter.h" #include "ui/base/clipboard/clipboard.h" @@ -178,7 +179,7 @@ unsigned int TestingBrowserProcess::AddRefModule() { } unsigned int TestingBrowserProcess::ReleaseModule() { - DCHECK(module_ref_count_ > 0); + DCHECK_GT(module_ref_count_, 0U); return --module_ref_count_; } @@ -195,6 +196,15 @@ TestingBrowserProcess::print_preview_tab_controller() { return NULL; } +printing::BackgroundPrintingManager* +TestingBrowserProcess::background_printing_manager() { + if (!background_printing_manager_.get()) { + background_printing_manager_.reset( + new printing::BackgroundPrintingManager()); + } + return background_printing_manager_.get(); +} + const std::string& TestingBrowserProcess::GetApplicationLocale() { return app_locale_; } diff --git a/chrome/test/testing_browser_process.h b/chrome/test/testing_browser_process.h index 66fe2835..69b2901 100644 --- a/chrome/test/testing_browser_process.h +++ b/chrome/test/testing_browser_process.h @@ -11,11 +11,10 @@ #define CHROME_TEST_TESTING_BROWSER_PROCESS_H_ #pragma once -#include "build/build_config.h" - #include <string> #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "content/common/notification_service.h" @@ -118,6 +117,8 @@ class TestingBrowserProcess : public BrowserProcess { virtual printing::PrintPreviewTabController* print_preview_tab_controller(); + virtual printing::BackgroundPrintingManager* background_printing_manager(); + virtual const std::string& GetApplicationLocale(); virtual void SetApplicationLocale(const std::string& app_locale); @@ -159,6 +160,7 @@ class TestingBrowserProcess : public BrowserProcess { scoped_ptr<GoogleURLTracker> google_url_tracker_; scoped_ptr<ProfileManager> profile_manager_; scoped_ptr<NotificationUIManager> notification_ui_manager_; + scoped_ptr<printing::BackgroundPrintingManager> background_printing_manager_; DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); }; |