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

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: linux fix Created 8 years, 4 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') | ui/ui.gyp » ('J')
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 0571759829211eae39485cabf7f081c39f990f0f..088bb2f964ed805e4c1952459daab33dbcab77c3 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.
@@ -114,18 +116,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();
@@ -167,3 +158,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);
tfarina 2012/08/28 01:17:08 ui::ResourceBundle
+
+ return RunMain();
+}
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/root_window.cc » ('j') | ui/ui.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698