OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_BROWSER_MAIN_PARTS_H_ | |
jam
2011/10/24 19:36:00
nit: CONTENT_PUBLIC_BROWSER_BOWSER_MAIN_PARTS_H_
stevenjb
2011/10/25 02:51:04
Oops. Done.
| |
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_BROWSER_MAIN_PARTS_H_ | |
7 #pragma once | |
8 | |
9 #include "content/common/content_export.h" | |
10 #include "content/common/result_codes.h" | |
11 | |
12 namespace content { | |
13 | |
14 // Classes deriving fromc BrowserMainParts should ontain singleton member | |
15 // variables specific to the browser process, and virtual methods representing | |
16 // different "stages" to be executed from |BrowserMain()|, mostly to do | |
17 // initialization and shutdown. | |
jam
2011/10/24 19:36:00
we don't really need to tell embedders where to pu
stevenjb
2011/10/25 02:51:04
Replaced with comment block from browser_main.cc
| |
18 // | |
19 // There can be any number of "Parts". These should be constructed in | |
20 // ContentBrowserClient::CreateBrowserMainParts. Each stage will be called | |
21 // for each part in the order it was added. Destruction is in the inverse order. | |
22 | |
jam
2011/10/24 19:36:00
nit: extra line
stevenjb
2011/10/25 02:51:04
Done.
| |
23 class CONTENT_EXPORT BrowserMainParts { | |
24 public: | |
25 BrowserMainParts() {}; | |
26 virtual ~BrowserMainParts() {}; | |
27 | |
28 virtual void PreEarlyInitialization() = 0; | |
29 | |
30 virtual void PostEarlyInitialization() = 0; | |
31 | |
32 virtual void PreMainMessageLoopStart() = 0; | |
33 | |
34 // Allows an embedder to do any extra toolkit initialization. | |
35 virtual void ToolkitInitialized() = 0; | |
36 | |
37 virtual void PostMainMessageLoopStart() = 0; | |
38 | |
39 // Returns a result code (see /common/result_codes.h). | |
40 // Default return value should be content::RESULT_CODE_NORMAL_EXIT. | |
41 virtual int PreMainMessageLoopRun() = 0; | |
jam
2011/10/24 19:36:00
why did you change this function to return a value
stevenjb
2011/10/25 02:51:04
That's much better. Done.
| |
42 | |
43 // Returns true if the message loop was run, false otherwise. | |
44 // If no BrowserMainParts implementations return true, the default | |
45 // implementation will be run. | |
46 virtual bool MainMessageLoopRun() = 0; | |
47 | |
48 virtual void PostMainMessageLoopRun() = 0; | |
49 | |
50 private: | |
jam
2011/10/24 19:36:00
nit: space before private
stevenjb
2011/10/25 02:51:04
Done.
| |
51 DISALLOW_COPY_AND_ASSIGN(BrowserMainParts); | |
52 }; | |
53 | |
54 } // namespace content | |
55 | |
56 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_BROWSER_MAIN_PARTS_H_ | |
OLD | NEW |