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

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

Issue 10443091: Make BrowserMainParts have an empty implementation to make embedding easier. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/content_browser.gypi ('k') | content/public/browser/browser_main_parts.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 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"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // - Unless your new code is just one or two lines, put it into a separate 47 // - Unless your new code is just one or two lines, put it into a separate
48 // method with a well-defined purpose. (Likewise, if you're adding to an 48 // method with a well-defined purpose. (Likewise, if you're adding to an
49 // existing chunk which makes it longer than one or two lines, please move 49 // existing chunk which makes it longer than one or two lines, please move
50 // the code out into a separate method.) 50 // the code out into a separate method.)
51 // 51 //
52 class CONTENT_EXPORT BrowserMainParts { 52 class CONTENT_EXPORT BrowserMainParts {
53 public: 53 public:
54 BrowserMainParts() {} 54 BrowserMainParts() {}
55 virtual ~BrowserMainParts() {} 55 virtual ~BrowserMainParts() {}
56 56
57 virtual void PreEarlyInitialization() = 0; 57 virtual void PreEarlyInitialization() {}
58 58
59 virtual void PostEarlyInitialization() = 0; 59 virtual void PostEarlyInitialization() {}
60 60
61 virtual void PreMainMessageLoopStart() = 0; 61 virtual void PreMainMessageLoopStart() {}
62 62
63 virtual void PostMainMessageLoopStart() = 0; 63 virtual void PostMainMessageLoopStart() {}
64 64
65 // Allows an embedder to do any extra toolkit initialization. 65 // Allows an embedder to do any extra toolkit initialization.
66 virtual void ToolkitInitialized() = 0; 66 virtual void ToolkitInitialized() {}
67 67
68 // Called just before any child threads owned by the content 68 // Called just before any child threads owned by the content
69 // framework are created. 69 // framework are created.
70 // 70 //
71 // The main message loop has been started at this point (but has not 71 // 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 72 // been run), and the toolkit has been initialized. Returns the error code
73 // (or 0 if no error). 73 // (or 0 if no error).
74 virtual int PreCreateThreads() = 0; 74 virtual int PreCreateThreads();
75 75
76 // This is called just before the main message loop is run. The 76 // This is called just before the main message loop is run. The
77 // various browser threads have all been created at this point 77 // various browser threads have all been created at this point
78 virtual void PreMainMessageLoopRun() = 0; 78 virtual void PreMainMessageLoopRun() {}
79 79
80 // Returns true if the message loop was run, false otherwise. 80 // Returns true if the message loop was run, false otherwise.
81 // If this returns false, the default implementation will be run. 81 // If this returns false, the default implementation will be run.
82 // May set |result_code|, which will be returned by |BrowserMain()|. 82 // May set |result_code|, which will be returned by |BrowserMain()|.
83 virtual bool MainMessageLoopRun(int* result_code) = 0; 83 virtual bool MainMessageLoopRun(int* result_code);
84 84
85 // This happens after the main message loop has stopped, but before 85 // This happens after the main message loop has stopped, but before
86 // threads are stopped. 86 // threads are stopped.
87 virtual void PostMainMessageLoopRun() = 0; 87 virtual void PostMainMessageLoopRun() {}
88 88
89 // Called as the very last part of shutdown, after threads have been 89 // Called as the very last part of shutdown, after threads have been
90 // stopped and destroyed. 90 // stopped and destroyed.
91 virtual void PostDestroyThreads() = 0; 91 virtual void PostDestroyThreads() {}
92 }; 92 };
93 93
94 } // namespace content 94 } // namespace content
95 95
96 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_PARTS_H_ 96 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_PARTS_H_
OLDNEW
« no previous file with comments | « content/content_browser.gypi ('k') | content/public/browser/browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698