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

Unified Diff: ui/aura/demo/demo_main.cc

Issue 10872002: beginnings of metro viewer process (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 8 years, 3 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 | « ui/aura/aura.gyp ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/demo/demo_main.cc
diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc
index 7b8f93dc8f9ba4a4ed35a95cb34201d6324fbb77..b3475ed9fe1df61a4999a34647e785dad7b3791f 100644
--- a/ui/aura/demo/demo_main.cc
+++ b/ui/aura/demo/demo_main.cc
@@ -27,6 +27,8 @@
#include "base/message_pump_aurax11.h"
#endif
+extern int ViewerProcessMain();
+
namespace {
// Trivial WindowDelegate implementation that draws a colored background.
@@ -118,18 +120,7 @@ class DemoStackingClient : public aura::client::StackingClient {
DISALLOW_COPY_AND_ASSIGN(DemoStackingClient);
};
-} // namespace
-
-int main(int argc, char** argv) {
- CommandLine::Init(argc, argv);
-
- // The exit manager is in charge of calling the dtors of singleton objects.
- base::AtExitManager exit_manager;
-
- ui::RegisterPathProvider();
- icu_util::Initialize();
- ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
-
+int DemoMain() {
// Create the message-loop here before creating the root window.
MessageLoop message_loop(MessageLoop::TYPE_UI);
ui::CompositorTestSupport::Initialize();
@@ -171,3 +162,27 @@ int main(int argc, char** argv) {
return 0;
}
+
+int RunMain() {
+ // TODO(scottmg): Something not crappy.
+ if (CommandLine::ForCurrentProcess()->HasSwitch("viewer")) {
+ return ViewerProcessMain();
+ } else {
+ return DemoMain();
+ }
+}
+
+} // namespace
+
+int main(int argc, char** argv) {
+ CommandLine::Init(argc, argv);
+
+ // The exit manager is in charge of calling the dtors of singleton objects.
+ base::AtExitManager exit_manager;
+
+ ui::RegisterPathProvider();
+ icu_util::Initialize();
+ ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
+
+ return RunMain();
+}
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698