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/logging.h" | 6 #include "base/logging.h" |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "examples/bitmap_uploader/bitmap_uploader.h" | 10 #include "examples/bitmap_uploader/bitmap_uploader.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 private: | 55 private: |
56 | 56 |
57 // Overridden from ApplicationDelegate: | 57 // Overridden from ApplicationDelegate: |
58 virtual void Initialize(ApplicationImpl* app) override { | 58 virtual void Initialize(ApplicationImpl* app) override { |
59 shell_ = app->shell(); | 59 shell_ = app->shell(); |
60 view_manager_client_factory_.reset( | 60 view_manager_client_factory_.reset( |
61 new ViewManagerClientFactory(app->shell(), this)); | 61 new ViewManagerClientFactory(app->shell(), this)); |
62 } | 62 } |
63 | 63 |
64 virtual bool ConfigureIncomingConnection( | 64 virtual bool ConfigureIncomingConnection( |
65 ApplicationConnection* connection) override { | 65 ApplicationConnection* connection, const std::string& url) override { |
66 connection->AddService(view_manager_client_factory_.get()); | 66 connection->AddService(view_manager_client_factory_.get()); |
67 return true; | 67 return true; |
68 } | 68 } |
69 | 69 |
70 // Overridden from ViewManagerDelegate: | 70 // Overridden from ViewManagerDelegate: |
71 virtual void OnEmbed(View* root, | 71 virtual void OnEmbed(View* root, |
72 InterfaceRequest<ServiceProvider> services, | 72 InterfaceRequest<ServiceProvider> services, |
73 ServiceProviderPtr exposed_services) override { | 73 ServiceProviderPtr exposed_services) override { |
74 root->AddObserver(this); | 74 root->AddObserver(this); |
75 Window* window = new Window(root, exposed_services.Pass(), shell_); | 75 Window* window = new Window(root, exposed_services.Pass(), shell_); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 DISALLOW_COPY_AND_ASSIGN(EmbeddedApp); | 110 DISALLOW_COPY_AND_ASSIGN(EmbeddedApp); |
111 }; | 111 }; |
112 | 112 |
113 } // namespace examples | 113 } // namespace examples |
114 } // namespace mojo | 114 } // namespace mojo |
115 | 115 |
116 MojoResult MojoMain(MojoHandle shell_handle) { | 116 MojoResult MojoMain(MojoHandle shell_handle) { |
117 mojo::ApplicationRunnerChromium runner(new mojo::examples::EmbeddedApp); | 117 mojo::ApplicationRunnerChromium runner(new mojo::examples::EmbeddedApp); |
118 return runner.Run(shell_handle); | 118 return runner.Run(shell_handle); |
119 } | 119 } |
OLD | NEW |