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

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

Issue 9375017: Support sharing of ContentMain and BrowserMain code with embedded use cases (try #3). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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 | « content/public/app/content_main_runner.h ('k') | content/public/browser/browser_main_runner.h » ('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 CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_PARTS_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_PARTS_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_PARTS_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_PARTS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 12
13 class MessageLoop;
14
13 namespace content { 15 namespace content {
14 16
15 // This class contains different "stages" to be executed by |BrowserMain()|, 17 // This class contains different "stages" to be executed by |BrowserMain()|,
16 // Each stage is represented by a single BrowserMainParts method, called from 18 // Each stage is represented by a single BrowserMainParts method, called from
17 // the corresponding method in |BrowserMainLoop| (e.g., EarlyInitialization()) 19 // the corresponding method in |BrowserMainLoop| (e.g., EarlyInitialization())
18 // which does the following: 20 // which does the following:
19 // - calls a method (e.g., "PreEarlyInitialization()") which implements 21 // - calls a method (e.g., "PreEarlyInitialization()") which implements
20 // platform / tookit specific code for that stage. 22 // platform / tookit specific code for that stage.
21 // - calls various methods for things common to all platforms (for that stage). 23 // - calls various methods for things common to all platforms (for that stage).
22 // - calls a method (e.g., "PostEarlyInitialization()") for platform-specific 24 // - calls a method (e.g., "PostEarlyInitialization()") for platform-specific
(...skipping 30 matching lines...) Expand all
53 public: 55 public:
54 BrowserMainParts() {} 56 BrowserMainParts() {}
55 virtual ~BrowserMainParts() {} 57 virtual ~BrowserMainParts() {}
56 58
57 virtual void PreEarlyInitialization() = 0; 59 virtual void PreEarlyInitialization() = 0;
58 60
59 virtual void PostEarlyInitialization() = 0; 61 virtual void PostEarlyInitialization() = 0;
60 62
61 virtual void PreMainMessageLoopStart() = 0; 63 virtual void PreMainMessageLoopStart() = 0;
62 64
65 // Return the main message loop object or NULL to use the default message
66 // loop object.
67 virtual MessageLoop* GetMainMessageLoop() = 0;
68
63 virtual void PostMainMessageLoopStart() = 0; 69 virtual void PostMainMessageLoopStart() = 0;
64 70
65 // Allows an embedder to do any extra toolkit initialization. 71 // Allows an embedder to do any extra toolkit initialization.
66 virtual void ToolkitInitialized() = 0; 72 virtual void ToolkitInitialized() = 0;
67 73
68 // Called just before any child threads owned by the content 74 // Called just before any child threads owned by the content
69 // framework are created. 75 // framework are created.
70 // 76 //
71 // The main message loop has been started at this point (but has not 77 // The main message loop has been started at this point (but has not
72 // been run), and the toolkit has been initialized. Returns the error code 78 // been run), and the toolkit has been initialized. Returns the error code
(...skipping 17 matching lines...) Expand all
90 // stopped and destroyed. 96 // stopped and destroyed.
91 virtual void PostDestroyThreads() = 0; 97 virtual void PostDestroyThreads() = 0;
92 98
93 private: 99 private:
94 DISALLOW_COPY_AND_ASSIGN(BrowserMainParts); 100 DISALLOW_COPY_AND_ASSIGN(BrowserMainParts);
95 }; 101 };
96 102
97 } // namespace content 103 } // namespace content
98 104
99 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_PARTS_H_ 105 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_PARTS_H_
OLDNEW
« no previous file with comments | « content/public/app/content_main_runner.h ('k') | content/public/browser/browser_main_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698