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

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

Issue 8609010: Make DevToolsManager a singleton, remove it from ContentBrowserClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reverted notification service changes, use non-leaky singleton Created 9 years, 1 month 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/browser/ui/browser.cc ('k') | chrome/test/base/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_BASE_TESTING_BROWSER_PROCESS_H_ 10 #ifndef CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 #if defined(OS_CHROMEOS) 57 #if defined(OS_CHROMEOS)
58 virtual base::Thread* web_socket_proxy_thread() OVERRIDE; 58 virtual base::Thread* web_socket_proxy_thread() OVERRIDE;
59 #endif 59 #endif
60 60
61 virtual ProfileManager* profile_manager() OVERRIDE; 61 virtual ProfileManager* profile_manager() OVERRIDE;
62 virtual PrefService* local_state() OVERRIDE; 62 virtual PrefService* local_state() OVERRIDE;
63 virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE; 63 virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE;
64 virtual IconManager* icon_manager() OVERRIDE; 64 virtual IconManager* icon_manager() OVERRIDE;
65 virtual ThumbnailGenerator* GetThumbnailGenerator() OVERRIDE; 65 virtual ThumbnailGenerator* GetThumbnailGenerator() OVERRIDE;
66 virtual DevToolsManager* devtools_manager() OVERRIDE;
67 virtual SidebarManager* sidebar_manager() OVERRIDE; 66 virtual SidebarManager* sidebar_manager() OVERRIDE;
68 virtual TabCloseableStateWatcher* tab_closeable_state_watcher() OVERRIDE; 67 virtual TabCloseableStateWatcher* tab_closeable_state_watcher() OVERRIDE;
69 virtual BackgroundModeManager* background_mode_manager() OVERRIDE; 68 virtual BackgroundModeManager* background_mode_manager() OVERRIDE;
70 virtual StatusTray* status_tray() OVERRIDE; 69 virtual StatusTray* status_tray() OVERRIDE;
71 virtual SafeBrowsingService* safe_browsing_service() OVERRIDE; 70 virtual SafeBrowsingService* safe_browsing_service() OVERRIDE;
72 virtual safe_browsing::ClientSideDetectionService* 71 virtual safe_browsing::ClientSideDetectionService*
73 safe_browsing_detection_service() OVERRIDE; 72 safe_browsing_detection_service() OVERRIDE;
74 virtual net::URLRequestContextGetter* system_request_context() OVERRIDE; 73 virtual net::URLRequestContextGetter* system_request_context() OVERRIDE;
75 74
76 #if defined(OS_CHROMEOS) 75 #if defined(OS_CHROMEOS)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 virtual GpuBlacklistUpdater* gpu_blacklist_updater() OVERRIDE; 113 virtual GpuBlacklistUpdater* gpu_blacklist_updater() OVERRIDE;
115 virtual ComponentUpdateService* component_updater() OVERRIDE; 114 virtual ComponentUpdateService* component_updater() OVERRIDE;
116 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; 115 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE;
117 116
118 // Set the local state for tests. Consumer is responsible for cleaning it up 117 // Set the local state for tests. Consumer is responsible for cleaning it up
119 // afterwards (using ScopedTestingLocalState, for example). 118 // afterwards (using ScopedTestingLocalState, for example).
120 void SetLocalState(PrefService* local_state); 119 void SetLocalState(PrefService* local_state);
121 void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker); 120 void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker);
122 void SetProfileManager(ProfileManager* profile_manager); 121 void SetProfileManager(ProfileManager* profile_manager);
123 void SetIOThread(IOThread* io_thread); 122 void SetIOThread(IOThread* io_thread);
124 void SetDevToolsManager(DevToolsManager* manager);
125 void SetBrowserPolicyConnector(policy::BrowserPolicyConnector* connector); 123 void SetBrowserPolicyConnector(policy::BrowserPolicyConnector* connector);
126 124
127 private: 125 private:
128 NotificationServiceImpl notification_service_; 126 NotificationServiceImpl notification_service_;
129 unsigned int module_ref_count_; 127 unsigned int module_ref_count_;
130 scoped_ptr<ui::Clipboard> clipboard_; 128 scoped_ptr<ui::Clipboard> clipboard_;
131 std::string app_locale_; 129 std::string app_locale_;
132 130
133 // Weak pointer. 131 // Weak pointer.
134 PrefService* local_state_; 132 PrefService* local_state_;
135 scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_; 133 scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_;
136 scoped_ptr<GoogleURLTracker> google_url_tracker_; 134 scoped_ptr<GoogleURLTracker> google_url_tracker_;
137 scoped_ptr<ProfileManager> profile_manager_; 135 scoped_ptr<ProfileManager> profile_manager_;
138 scoped_ptr<NotificationUIManager> notification_ui_manager_; 136 scoped_ptr<NotificationUIManager> notification_ui_manager_;
139 scoped_ptr<printing::BackgroundPrintingManager> background_printing_manager_; 137 scoped_ptr<printing::BackgroundPrintingManager> background_printing_manager_;
140 scoped_refptr<printing::PrintPreviewTabController> 138 scoped_refptr<printing::PrintPreviewTabController>
141 print_preview_tab_controller_; 139 print_preview_tab_controller_;
142 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; 140 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_;
143 IOThread* io_thread_; 141 IOThread* io_thread_;
144 scoped_ptr<DevToolsManager> devtools_manager_;
145 142
146 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); 143 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess);
147 }; 144 };
148 145
149 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ 146 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/test/base/testing_browser_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698