| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/macros.h" | 6 #include "base/macros.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "mojo/application/application_runner_chromium.h" | 9 #include "mojo/application/application_runner_chromium.h" |
| 10 #include "mojo/examples/bitmap_uploader/bitmap_uploader.h" | 10 #include "mojo/examples/bitmap_uploader/bitmap_uploader.h" |
| 11 #include "mojo/examples/window_manager/window_manager.mojom.h" | 11 #include "mojo/examples/window_manager/window_manager.mojom.h" |
| 12 #include "mojo/public/c/system/main.h" | 12 #include "mojo/public/c/system/main.h" |
| 13 #include "mojo/public/cpp/application/application_connection.h" | 13 #include "mojo/public/cpp/application/application_connection.h" |
| 14 #include "mojo/public/cpp/application/application_delegate.h" | 14 #include "mojo/public/cpp/application/application_delegate.h" |
| 15 #include "mojo/public/cpp/application/application_impl.h" | 15 #include "mojo/public/cpp/application/application_impl.h" |
| 16 #include "mojo/public/cpp/application/interface_factory_impl.h" | 16 #include "mojo/public/cpp/application/interface_factory_impl.h" |
| 17 #include "mojo/services/public/cpp/view_manager/view.h" | 17 #include "mojo/services/public/cpp/view_manager/view.h" |
| 18 #include "mojo/services/public/cpp/view_manager/view_manager.h" | 18 #include "mojo/services/public/cpp/view_manager/view_manager.h" |
| 19 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h" | 19 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h" |
| 20 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h" | 20 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h" |
| 21 #include "mojo/services/public/cpp/view_manager/view_observer.h" | 21 #include "mojo/services/public/cpp/view_manager/view_observer.h" |
| 22 #include "ui/events/event_constants.h" | 22 #include "ui/events/event_constants.h" |
| 23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 24 | 24 |
| 25 namespace mojo { | 25 namespace mojo { |
| 26 namespace examples { | 26 namespace examples { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 const char kEmbeddedAppURL[] = "mojo:mojo_embedded_app"; | 29 const char kEmbeddedAppURL[] = "mojo:embedded_app"; |
| 30 } | 30 } |
| 31 | 31 |
| 32 class NestingApp; | 32 class NestingApp; |
| 33 | 33 |
| 34 // An app that embeds another app. | 34 // An app that embeds another app. |
| 35 // TODO(davemoore): Is this the right name? | 35 // TODO(davemoore): Is this the right name? |
| 36 class NestingApp | 36 class NestingApp |
| 37 : public ApplicationDelegate, | 37 : public ApplicationDelegate, |
| 38 public ViewManagerDelegate, | 38 public ViewManagerDelegate, |
| 39 public ViewObserver { | 39 public ViewObserver { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 DISALLOW_COPY_AND_ASSIGN(NestingApp); | 96 DISALLOW_COPY_AND_ASSIGN(NestingApp); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace examples | 99 } // namespace examples |
| 100 } // namespace mojo | 100 } // namespace mojo |
| 101 | 101 |
| 102 MojoResult MojoMain(MojoHandle shell_handle) { | 102 MojoResult MojoMain(MojoHandle shell_handle) { |
| 103 mojo::ApplicationRunnerChromium runner(new mojo::examples::NestingApp); | 103 mojo::ApplicationRunnerChromium runner(new mojo::examples::NestingApp); |
| 104 return runner.Run(shell_handle); | 104 return runner.Run(shell_handle); |
| 105 } | 105 } |
| OLD | NEW |