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

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

Issue 2215353004: content: Let embedders know when MojoShellConnection is initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | no next file » | 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 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 class MojoShellConnection;
13
12 // This class contains different "stages" to be executed by |BrowserMain()|, 14 // This class contains different "stages" to be executed by |BrowserMain()|,
13 // Each stage is represented by a single BrowserMainParts method, called from 15 // Each stage is represented by a single BrowserMainParts method, called from
14 // the corresponding method in |BrowserMainLoop| (e.g., EarlyInitialization()) 16 // the corresponding method in |BrowserMainLoop| (e.g., EarlyInitialization())
15 // which does the following: 17 // which does the following:
16 // - calls a method (e.g., "PreEarlyInitialization()") which implements 18 // - calls a method (e.g., "PreEarlyInitialization()") which implements
17 // platform / tookit specific code for that stage. 19 // platform / tookit specific code for that stage.
18 // - calls various methods for things common to all platforms (for that stage). 20 // - calls various methods for things common to all platforms (for that stage).
19 // - calls a method (e.g., "PostEarlyInitialization()") for platform-specific 21 // - calls a method (e.g., "PostEarlyInitialization()") for platform-specific
20 // code to be called after the common code. 22 // code to be called after the common code.
21 // 23 //
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual void ToolkitInitialized() {} 65 virtual void ToolkitInitialized() {}
64 66
65 // Called just before any child threads owned by the content 67 // Called just before any child threads owned by the content
66 // framework are created. 68 // framework are created.
67 // 69 //
68 // The main message loop has been started at this point (but has not 70 // The main message loop has been started at this point (but has not
69 // been run), and the toolkit has been initialized. Returns the error code 71 // been run), and the toolkit has been initialized. Returns the error code
70 // (or 0 if no error). 72 // (or 0 if no error).
71 virtual int PreCreateThreads(); 73 virtual int PreCreateThreads();
72 74
75 virtual void MojoShellConnectionStarted(MojoShellConnection* connection) {}
76
73 // This is called just before the main message loop is run. The 77 // This is called just before the main message loop is run. The
74 // various browser threads have all been created at this point 78 // various browser threads have all been created at this point
75 virtual void PreMainMessageLoopRun() {} 79 virtual void PreMainMessageLoopRun() {}
76 80
77 // Returns true if the message loop was run, false otherwise. 81 // Returns true if the message loop was run, false otherwise.
78 // If this returns false, the default implementation will be run. 82 // If this returns false, the default implementation will be run.
79 // May set |result_code|, which will be returned by |BrowserMain()|. 83 // May set |result_code|, which will be returned by |BrowserMain()|.
80 virtual bool MainMessageLoopRun(int* result_code); 84 virtual bool MainMessageLoopRun(int* result_code);
81 85
82 // This happens after the main message loop has stopped, but before 86 // This happens after the main message loop has stopped, but before
83 // threads are stopped. 87 // threads are stopped.
84 virtual void PostMainMessageLoopRun() {} 88 virtual void PostMainMessageLoopRun() {}
85 89
86 // Called as the very last part of shutdown, after threads have been 90 // Called as the very last part of shutdown, after threads have been
87 // stopped and destroyed. 91 // stopped and destroyed.
88 virtual void PostDestroyThreads() {} 92 virtual void PostDestroyThreads() {}
89 }; 93 };
90 94
91 } // namespace content 95 } // namespace content
92 96
93 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_PARTS_H_ 97 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_PARTS_H_
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698