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