| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "examples/recipes/window_manager/window_manager.h" | 7 #include "examples/recipes/window_manager/window_manager.h" |
| 8 #include "mojo/application/application_runner_chromium.h" | 8 #include "mojo/application/application_runner_chromium.h" |
| 9 #include "mojo/public/c/system/main.h" | 9 #include "mojo/public/c/system/main.h" |
| 10 #include "mojo/public/cpp/application/application_delegate.h" | 10 #include "mojo/public/cpp/application/application_delegate.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 private: | 32 private: |
| 33 // Overridden from mojo::ApplicationDelegate: | 33 // Overridden from mojo::ApplicationDelegate: |
| 34 void Initialize(mojo::ApplicationImpl* impl) override { | 34 void Initialize(mojo::ApplicationImpl* impl) override { |
| 35 window_manager_app_->Initialize(impl); | 35 window_manager_app_->Initialize(impl); |
| 36 | 36 |
| 37 for (size_t i = 1; i < impl->args().size(); ++i) { | 37 for (size_t i = 1; i < impl->args().size(); ++i) { |
| 38 window_manager_app_->Embed(impl->args()[i], nullptr, nullptr); | 38 window_manager_app_->Embed(impl->args()[i], nullptr, nullptr); |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 bool ConfigureIncomingConnection( | 41 bool ConfigureIncomingConnection( |
| 42 mojo::ApplicationConnection* connection) override { | 42 mojo::ApplicationConnection* connection, const std::string& url) override
{ |
| 43 window_manager_app_->ConfigureIncomingConnection(connection); | 43 window_manager_app_->ConfigureIncomingConnection(connection, url); |
| 44 return true; | 44 return true; |
| 45 } | 45 } |
| 46 | 46 |
| 47 // Overridden from mojo::ViewManagerDelegate: | 47 // Overridden from mojo::ViewManagerDelegate: |
| 48 void OnEmbed(mojo::View* root, | 48 void OnEmbed(mojo::View* root, |
| 49 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 49 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
| 50 mojo::ServiceProviderPtr exposed_services) override { | 50 mojo::ServiceProviderPtr exposed_services) override { |
| 51 window_manager_.reset(new WindowManager(root)); | 51 window_manager_.reset(new WindowManager(root)); |
| 52 | 52 |
| 53 window_manager_app_->InitFocus( | 53 window_manager_app_->InitFocus( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 72 DISALLOW_COPY_AND_ASSIGN(Main); | 72 DISALLOW_COPY_AND_ASSIGN(Main); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // window_manager | 75 } // window_manager |
| 76 } // recipes | 76 } // recipes |
| 77 | 77 |
| 78 MojoResult MojoMain(MojoHandle shell_handle) { | 78 MojoResult MojoMain(MojoHandle shell_handle) { |
| 79 mojo::ApplicationRunnerChromium runner(new recipes::window_manager::Main); | 79 mojo::ApplicationRunnerChromium runner(new recipes::window_manager::Main); |
| 80 return runner.Run(shell_handle); | 80 return runner.Run(shell_handle); |
| 81 } | 81 } |
| OLD | NEW |