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

Side by Side Diff: content/public/browser/browser_main_runner.h

Issue 19957002: Run the later parts of startup as UI thread tasks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Run the later parts of startup as UI thread tasks - minor comment fixes Created 7 years, 5 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
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 CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_RUNNER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_RUNNER_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_RUNNER_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_RUNNER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
9 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/public/common/startup_task_runner.h"
joth 2013/07/22 16:28:15 you could just fwd declare StartupTaskRunner here
aberent 2013/07/26 20:36:54 This file is no longer part of the CL.
10 12
11 namespace content { 13 namespace content {
12 14
13 struct MainFunctionParams; 15 struct MainFunctionParams;
14 16
15 // This class is responsible for browser initialization, running and shutdown. 17 // This class is responsible for browser initialization, running and shutdown.
16 class CONTENT_EXPORT BrowserMainRunner { 18 class CONTENT_EXPORT BrowserMainRunner {
17 public: 19 public:
18 virtual ~BrowserMainRunner() {} 20 virtual ~BrowserMainRunner() {}
19 21
20 // Create a new BrowserMainRunner object. 22 // Create a new BrowserMainRunner object.
21 static BrowserMainRunner* Create(); 23 static BrowserMainRunner* Create();
22 24
23 // Initialize all necessary browser state. The |parameters| values will be 25 // Initialize all necessary browser state. The |parameters| values will be
24 // copied. 26 // copied.
25 virtual int Initialize(const content::MainFunctionParams& parameters) = 0; 27 virtual int Initialize(
28 const content::MainFunctionParams& parameters,
29 const scoped_refptr<StartupTaskRunner>& task_runner) = 0;
26 30
27 // Perform the default run logic. 31 // Perform the default run logic.
28 virtual int Run() = 0; 32 virtual int Run() = 0;
29 33
30 // Shut down the browser state. 34 // Shut down the browser state.
31 virtual void Shutdown() = 0; 35 virtual void Shutdown() = 0;
32 }; 36 };
33 37
34 } // namespace content 38 } // namespace content
35 39
36 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_RUNNER_H_ 40 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698