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

Unified Diff: content/browser/browser_main_loop.h

Issue 8302016: Make GTK and Aura parts orthogonal to OS parts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/browser_main.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.h
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h
new file mode 100644
index 0000000000000000000000000000000000000000..e9f67a6f8a40f858c4af2630e30824513648b956
--- /dev/null
+++ b/content/browser/browser_main_loop.h
@@ -0,0 +1,75 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
+#define CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
+#pragma once
+
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+
+class BrowserThread;
+class CommandLine;
+class HighResolutionTimerManager;
+class MessageLoop;
+
+struct MainFunctionParams;
+
+namespace base {
+class SystemMonitor;
+}
+
+namespace net {
+class NetworkChangeNotifier;
+}
+
+namespace content {
+
+class BrowserMainParts;
+
+// Implements the main browser loop stages called from |BrowserMain()|.
+// See comments in browser_main_parts.h for additional info.
+class BrowserMainLoop {
+ public:
+ explicit BrowserMainLoop(const MainFunctionParams& parameters);
+ virtual ~BrowserMainLoop();
+
+ void Init();
+
+ void EarlyInitialization();
+ void InitializeToolkit();
+ void MainMessageLoopStart();
+ void RunMainMessageLoopParts(bool* completed_main_message_loop);
+ void MainMessageLoopRun();
+
+ int GetResultCode() const { return result_code_; }
+
+ private:
+ void InitializeMainThread();
+
+ // Members initialized on construction ---------------------------------------
+ const MainFunctionParams& parameters_;
+ const CommandLine& parsed_command_line_;
+ int result_code_;
+
+ // Vector of BrowserMainParts set by CreateBrowserMainParts ------------------
+ // The BrowserParts fucntions for each part are called in the order added.
+ // They are released (destroyed) in the reverse order.
+ std::vector<BrowserMainParts*> parts_list_;
+
+ // Members initialized in |MainMessageLoopStart()| ---------------------------
+ scoped_ptr<MessageLoop> main_message_loop_;
+ scoped_ptr<base::SystemMonitor> system_monitor_;
+ scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_;
+ scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
+ scoped_ptr<BrowserThread> main_thread_;
+
+ DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
« no previous file with comments | « content/browser/browser_main.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698