Index: content/public/browser/browser_main_parts.h |
diff --git a/content/public/browser/browser_main_parts.h b/content/public/browser/browser_main_parts.h |
index 860541c4e14f6905585e9a2afc56634ca21983bc..15721c57f57e79f75682e2cc30b6d4d145ecbdc0 100644 |
--- a/content/public/browser/browser_main_parts.h |
+++ b/content/public/browser/browser_main_parts.h |
@@ -8,6 +8,7 @@ |
#include "base/basictypes.h" |
#include "content/common/content_export.h" |
+#include "content/public/browser/browser_thread.h" |
namespace content { |
@@ -64,15 +65,32 @@ class CONTENT_EXPORT BrowserMainParts { |
// Allows an embedder to do any extra toolkit initialization. |
virtual void ToolkitInitialized() = 0; |
+ // Child threads have not been created at this point. |
virtual void PreMainMessageLoopRun() = 0; |
+ // The various browser threads have been created at this point. |
+ virtual void PreMainMessageLoopRunThreadsCreated() = 0; |
+ |
// Returns true if the message loop was run, false otherwise. |
// If this returns false, the default implementation will be run. |
// May set |result_code|, which will be returned by |BrowserMain()|. |
virtual bool MainMessageLoopRun(int* result_code) = 0; |
+ // This happens after the main message loop has stopped, but before |
+ // threads are stopped. |
virtual void PostMainMessageLoopRun() = 0; |
+ // Called once for each thread owned by the content framework just |
+ // before and just after it is torn down. This is in reverse order |
+ // of the threads' appearance in the BrowserThread::ID enumeration. |
+ // Note that you will not receive such a call for BrowserThread::UI, |
+ // since it is the main thread of the application. |
+ virtual void PreStopThread(BrowserThread::ID identifier) = 0; |
+ virtual void PostStopThread(BrowserThread::ID identifier) = 0; |
+ |
+ // Called as the very last part of shutdown. |
+ virtual void FinalCleanup() = 0; |
+ |
private: |
DISALLOW_COPY_AND_ASSIGN(BrowserMainParts); |
}; |