| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_BROWSER_MAIN_LOOP_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 6 #define CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 | 13 |
| 14 class BrowserThread; | |
| 15 class CommandLine; | 14 class CommandLine; |
| 16 class HighResolutionTimerManager; | 15 class HighResolutionTimerManager; |
| 17 class MessageLoop; | 16 class MessageLoop; |
| 18 | 17 |
| 19 struct MainFunctionParams; | 18 struct MainFunctionParams; |
| 20 | 19 |
| 21 namespace base { | 20 namespace base { |
| 22 class SystemMonitor; | 21 class SystemMonitor; |
| 23 } | 22 } |
| 24 | 23 |
| 25 namespace net { | 24 namespace net { |
| 26 class NetworkChangeNotifier; | 25 class NetworkChangeNotifier; |
| 27 } | 26 } |
| 28 | 27 |
| 29 namespace content { | 28 namespace content { |
| 30 | 29 |
| 31 class BrowserMainParts; | 30 class BrowserMainParts; |
| 31 class BrowserThreadImpl; |
| 32 | 32 |
| 33 // Implements the main browser loop stages called from |BrowserMain()|. | 33 // Implements the main browser loop stages called from |BrowserMain()|. |
| 34 // See comments in browser_main_parts.h for additional info. | 34 // See comments in browser_main_parts.h for additional info. |
| 35 class BrowserMainLoop { | 35 class BrowserMainLoop { |
| 36 public: | 36 public: |
| 37 explicit BrowserMainLoop(const MainFunctionParams& parameters); | 37 explicit BrowserMainLoop(const MainFunctionParams& parameters); |
| 38 virtual ~BrowserMainLoop(); | 38 virtual ~BrowserMainLoop(); |
| 39 | 39 |
| 40 void Init(); | 40 void Init(); |
| 41 | 41 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 58 // Vector of BrowserMainParts set by CreateBrowserMainParts ------------------ | 58 // Vector of BrowserMainParts set by CreateBrowserMainParts ------------------ |
| 59 // The BrowserParts fucntions for each part are called in the order added. | 59 // The BrowserParts fucntions for each part are called in the order added. |
| 60 // They are released (destroyed) in the reverse order. | 60 // They are released (destroyed) in the reverse order. |
| 61 std::vector<BrowserMainParts*> parts_list_; | 61 std::vector<BrowserMainParts*> parts_list_; |
| 62 | 62 |
| 63 // Members initialized in |MainMessageLoopStart()| --------------------------- | 63 // Members initialized in |MainMessageLoopStart()| --------------------------- |
| 64 scoped_ptr<MessageLoop> main_message_loop_; | 64 scoped_ptr<MessageLoop> main_message_loop_; |
| 65 scoped_ptr<base::SystemMonitor> system_monitor_; | 65 scoped_ptr<base::SystemMonitor> system_monitor_; |
| 66 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; | 66 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; |
| 67 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 67 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
| 68 scoped_ptr<BrowserThread> main_thread_; | 68 scoped_ptr<BrowserThreadImpl> main_thread_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 70 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace content | 73 } // namespace content |
| 74 | 74 |
| 75 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 75 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
| OLD | NEW |