| OLD | NEW |
| 1 // Copyright (c) 2011 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 Loading... |
| 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. | 78 // been run), and the toolkit has been initialized. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 89 // stopped and destroyed. | 95 // stopped and destroyed. |
| 90 virtual void PostDestroyThreads() = 0; | 96 virtual void PostDestroyThreads() = 0; |
| 91 | 97 |
| 92 private: | 98 private: |
| 93 DISALLOW_COPY_AND_ASSIGN(BrowserMainParts); | 99 DISALLOW_COPY_AND_ASSIGN(BrowserMainParts); |
| 94 }; | 100 }; |
| 95 | 101 |
| 96 } // namespace content | 102 } // namespace content |
| 97 | 103 |
| 98 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_PARTS_H_ | 104 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_PARTS_H_ |
| OLD | NEW |