Chromium Code Reviews| 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(); |
| +} |