| OLD | NEW |
| 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 { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // Allows an embedder to do any extra toolkit initialization. | 62 // Allows an embedder to do any extra toolkit initialization. |
| 63 virtual void ToolkitInitialized() {} | 63 virtual void ToolkitInitialized() {} |
| 64 | 64 |
| 65 // Called just before any child threads owned by the content | 65 // Called just before any child threads owned by the content |
| 66 // framework are created. | 66 // framework are created. |
| 67 // | 67 // |
| 68 // The main message loop has been started at this point (but has not | 68 // 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 | 69 // been run), and the toolkit has been initialized. Returns the error code |
| 70 // (or 0 if no error). | 70 // (or 0 if no error). |
| 71 virtual int PreCreateThreads(); | 71 virtual int PreCreateThreadsBegin(); |
| 72 |
| 73 // Allow to do some jobs after PreCreateThreads() but just before actually |
| 74 // starting threads. |
| 75 virtual void PreCreateThreadsEnd() {} |
| 72 | 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_ |
| OLD | NEW |