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 "examples/bitmap_uploader/bitmap_uploader.h" | 9 #include "examples/bitmap_uploader/bitmap_uploader.h" |
10 #include "examples/window_manager/window_manager.mojom.h" | 10 #include "examples/window_manager/window_manager.mojom.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 private: | 44 private: |
45 // Overridden from ApplicationDelegate: | 45 // Overridden from ApplicationDelegate: |
46 virtual void Initialize(ApplicationImpl* app) override { | 46 virtual void Initialize(ApplicationImpl* app) override { |
47 shell_ = app->shell(); | 47 shell_ = app->shell(); |
48 view_manager_client_factory_.reset( | 48 view_manager_client_factory_.reset( |
49 new ViewManagerClientFactory(app->shell(), this)); | 49 new ViewManagerClientFactory(app->shell(), this)); |
50 } | 50 } |
51 | 51 |
52 // Overridden from ApplicationImpl: | 52 // Overridden from ApplicationImpl: |
53 virtual bool ConfigureIncomingConnection( | 53 virtual bool ConfigureIncomingConnection( |
54 ApplicationConnection* connection) override { | 54 ApplicationConnection* connection, const std::string& url) override { |
55 connection->ConnectToService(&window_manager_); | 55 connection->ConnectToService(&window_manager_); |
56 connection->AddService(view_manager_client_factory_.get()); | 56 connection->AddService(view_manager_client_factory_.get()); |
57 return true; | 57 return true; |
58 } | 58 } |
59 | 59 |
60 // Overridden from ViewManagerDelegate: | 60 // Overridden from ViewManagerDelegate: |
61 virtual void OnEmbed(View* root, | 61 virtual void OnEmbed(View* root, |
62 InterfaceRequest<ServiceProvider> services, | 62 InterfaceRequest<ServiceProvider> services, |
63 ServiceProviderPtr exposed_services) override { | 63 ServiceProviderPtr exposed_services) override { |
64 root->AddObserver(this); | 64 root->AddObserver(this); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 DISALLOW_COPY_AND_ASSIGN(NestingApp); | 99 DISALLOW_COPY_AND_ASSIGN(NestingApp); |
100 }; | 100 }; |
101 | 101 |
102 } // namespace examples | 102 } // namespace examples |
103 } // namespace mojo | 103 } // namespace mojo |
104 | 104 |
105 MojoResult MojoMain(MojoHandle shell_handle) { | 105 MojoResult MojoMain(MojoHandle shell_handle) { |
106 mojo::ApplicationRunnerChromium runner(new mojo::examples::NestingApp); | 106 mojo::ApplicationRunnerChromium runner(new mojo::examples::NestingApp); |
107 return runner.Run(shell_handle); | 107 return runner.Run(shell_handle); |
108 } | 108 } |
OLD | NEW |