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

Side by Side Diff: chrome/browser/chrome_browser_main.h

Issue 2456783002: Decouple PowerUsageMonitor{Impl} from //content/browser (Closed)
Patch Set: change define position of power_usage_moniter_ in ChromeBrowserMain Created 4 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
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/chrome_browser_main.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) 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 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ 5 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_H_
6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ 6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/metrics/field_trial.h" 12 #include "base/metrics/field_trial.h"
13 #include "base/profiler/stack_sampling_profiler.h" 13 #include "base/profiler/stack_sampling_profiler.h"
14 #include "base/tracked_objects.h" 14 #include "base/tracked_objects.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "chrome/browser/chrome_browser_field_trials.h" 16 #include "chrome/browser/chrome_browser_field_trials.h"
17 #include "chrome/browser/chrome_process_singleton.h" 17 #include "chrome/browser/chrome_process_singleton.h"
18 #include "chrome/browser/first_run/first_run.h" 18 #include "chrome/browser/first_run/first_run.h"
19 #include "chrome/browser/power_usage_monitor/power_usage_monitor.h"
19 #include "chrome/browser/process_singleton.h" 20 #include "chrome/browser/process_singleton.h"
20 #include "chrome/browser/ui/startup/startup_browser_creator.h" 21 #include "chrome/browser/ui/startup/startup_browser_creator.h"
21 #include "chrome/common/stack_sampling_configuration.h" 22 #include "chrome/common/stack_sampling_configuration.h"
22 #include "content/public/browser/browser_main_parts.h" 23 #include "content/public/browser/browser_main_parts.h"
23 #include "content/public/common/main_function_params.h" 24 #include "content/public/common/main_function_params.h"
24 25
25 class BrowserProcessImpl; 26 class BrowserProcessImpl;
26 class ChromeBrowserMainExtraParts; 27 class ChromeBrowserMainExtraParts;
27 class FieldTrialSynchronizer; 28 class FieldTrialSynchronizer;
28 class MetricsService; 29 class MetricsService;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 scoped_refptr<metrics::TrackingSynchronizer> tracking_synchronizer_; 168 scoped_refptr<metrics::TrackingSynchronizer> tracking_synchronizer_;
168 169
169 #if !defined(OS_ANDROID) 170 #if !defined(OS_ANDROID)
170 // Browser creation happens on the Java side in Android. 171 // Browser creation happens on the Java side in Android.
171 std::unique_ptr<StartupBrowserCreator> browser_creator_; 172 std::unique_ptr<StartupBrowserCreator> browser_creator_;
172 173
173 // Android doesn't support multiple browser processes, so it doesn't implement 174 // Android doesn't support multiple browser processes, so it doesn't implement
174 // ProcessSingleton. 175 // ProcessSingleton.
175 std::unique_ptr<ChromeProcessSingleton> process_singleton_; 176 std::unique_ptr<ChromeProcessSingleton> process_singleton_;
176 177
178 #if !defined(OS_LINUX) || defined(OS_CHROMEOS) // http://crbug.com/426393
179 std::unique_ptr<PowerUsageMonitor> power_usage_monitor_;
180 #endif // !defined(OS_LINUX) || defined(OS_CHROMEOS)
181
177 // Android's first run is done in Java instead of native. 182 // Android's first run is done in Java instead of native.
178 std::unique_ptr<first_run::MasterPrefs> master_prefs_; 183 std::unique_ptr<first_run::MasterPrefs> master_prefs_;
179 184
180 ProcessSingleton::NotifyResult notify_result_ = 185 ProcessSingleton::NotifyResult notify_result_ =
181 ProcessSingleton::PROCESS_NONE; 186 ProcessSingleton::PROCESS_NONE;
182 187
183 // Members needed across shutdown methods. 188 // Members needed across shutdown methods.
184 bool restart_last_session_ = false; 189 bool restart_last_session_ = false;
185 #endif 190 #endif
186 191
187 Profile* profile_; 192 Profile* profile_;
188 bool run_message_loop_; 193 bool run_message_loop_;
189 std::unique_ptr<ThreeDAPIObserver> three_d_observer_; 194 std::unique_ptr<ThreeDAPIObserver> three_d_observer_;
190 195
191 // Initialized in |SetupFieldTrials()|. 196 // Initialized in |SetupFieldTrials()|.
192 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; 197 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_;
193 198
194 // Members initialized in PreMainMessageLoopRun, needed in 199 // Members initialized in PreMainMessageLoopRun, needed in
195 // PreMainMessageLoopRunThreadsCreated. 200 // PreMainMessageLoopRunThreadsCreated.
196 PrefService* local_state_; 201 PrefService* local_state_;
197 base::FilePath user_data_dir_; 202 base::FilePath user_data_dir_;
198 203
199 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); 204 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts);
200 }; 205 };
201 206
202 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ 207 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698