Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Side by Side Diff: chrome/test/testing_browser_process.h

Issue 6930034: Print Preview: Print in the background. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/test/testing_browser_process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // An implementation of BrowserProcess for unit tests that fails for most 5 // An implementation of BrowserProcess for unit tests that fails for most
6 // services. By preventing creation of services, we reduce dependencies and 6 // services. By preventing creation of services, we reduce dependencies and
7 // keep the profile clean. Clients of this class must handle the NULL return 7 // keep the profile clean. Clients of this class must handle the NULL return
8 // value, however. 8 // value, however.
9 9
10 #ifndef CHROME_TEST_TESTING_BROWSER_PROCESS_H_ 10 #ifndef CHROME_TEST_TESTING_BROWSER_PROCESS_H_
11 #define CHROME_TEST_TESTING_BROWSER_PROCESS_H_ 11 #define CHROME_TEST_TESTING_BROWSER_PROCESS_H_
12 #pragma once 12 #pragma once
13 13
14 #include "build/build_config.h"
15
16 #include <string> 14 #include <string>
17 15
18 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "build/build_config.h"
19 #include "chrome/browser/browser_process.h" 18 #include "chrome/browser/browser_process.h"
20 #include "content/common/notification_service.h" 19 #include "content/common/notification_service.h"
21 20
22 class IOThread; 21 class IOThread;
23 class GoogleURLTracker; 22 class GoogleURLTracker;
24 class NotificationUIManager; 23 class NotificationUIManager;
25 class PrefService; 24 class PrefService;
26 class WatchDogThread; 25 class WatchDogThread;
27 26
28 namespace base { 27 namespace base {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 110
112 virtual unsigned int AddRefModule(); 111 virtual unsigned int AddRefModule();
113 virtual unsigned int ReleaseModule(); 112 virtual unsigned int ReleaseModule();
114 113
115 virtual bool IsShuttingDown(); 114 virtual bool IsShuttingDown();
116 115
117 virtual printing::PrintJobManager* print_job_manager(); 116 virtual printing::PrintJobManager* print_job_manager();
118 117
119 virtual printing::PrintPreviewTabController* print_preview_tab_controller(); 118 virtual printing::PrintPreviewTabController* print_preview_tab_controller();
120 119
120 virtual printing::BackgroundPrintingManager* background_printing_manager();
121
121 virtual const std::string& GetApplicationLocale(); 122 virtual const std::string& GetApplicationLocale();
122 123
123 virtual void SetApplicationLocale(const std::string& app_locale); 124 virtual void SetApplicationLocale(const std::string& app_locale);
124 125
125 virtual DownloadStatusUpdater* download_status_updater(); 126 virtual DownloadStatusUpdater* download_status_updater();
126 127
127 virtual base::WaitableEvent* shutdown_event(); 128 virtual base::WaitableEvent* shutdown_event();
128 129
129 virtual bool plugin_finder_disabled() const; 130 virtual bool plugin_finder_disabled() const;
130 131
(...skipping 21 matching lines...) Expand all
152 unsigned int module_ref_count_; 153 unsigned int module_ref_count_;
153 scoped_ptr<ui::Clipboard> clipboard_; 154 scoped_ptr<ui::Clipboard> clipboard_;
154 std::string app_locale_; 155 std::string app_locale_;
155 156
156 // Weak pointer. 157 // Weak pointer.
157 PrefService* local_state_; 158 PrefService* local_state_;
158 scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_; 159 scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_;
159 scoped_ptr<GoogleURLTracker> google_url_tracker_; 160 scoped_ptr<GoogleURLTracker> google_url_tracker_;
160 scoped_ptr<ProfileManager> profile_manager_; 161 scoped_ptr<ProfileManager> profile_manager_;
161 scoped_ptr<NotificationUIManager> notification_ui_manager_; 162 scoped_ptr<NotificationUIManager> notification_ui_manager_;
163 scoped_ptr<printing::BackgroundPrintingManager> background_printing_manager_;
162 164
163 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); 165 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess);
164 }; 166 };
165 167
166 // Scoper to put a TestingBrowserProcess in |g_browser_process|. 168 // Scoper to put a TestingBrowserProcess in |g_browser_process|.
167 class ScopedTestingBrowserProcess { 169 class ScopedTestingBrowserProcess {
168 public: 170 public:
169 ScopedTestingBrowserProcess(); 171 ScopedTestingBrowserProcess();
170 ~ScopedTestingBrowserProcess(); 172 ~ScopedTestingBrowserProcess();
171 173
172 TestingBrowserProcess* get() { 174 TestingBrowserProcess* get() {
173 return browser_process_.get(); 175 return browser_process_.get();
174 } 176 }
175 177
176 private: 178 private:
177 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. 179 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062.
178 // After the transition is over, we should just stack-allocate it. 180 // After the transition is over, we should just stack-allocate it.
179 scoped_ptr<TestingBrowserProcess> browser_process_; 181 scoped_ptr<TestingBrowserProcess> browser_process_;
180 182
181 DISALLOW_COPY_AND_ASSIGN(ScopedTestingBrowserProcess); 183 DISALLOW_COPY_AND_ASSIGN(ScopedTestingBrowserProcess);
182 }; 184 };
183 185
184 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_ 186 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/test/testing_browser_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698