| 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 "components/view_manager/public/cpp/view_manager_context.h" | 5 #include "components/view_manager/public/cpp/view_manager_context.h" |
| 6 | 6 |
| 7 #include "components/window_manager/public/interfaces/window_manager.mojom.h" | |
| 8 #include "mojo/application/public/cpp/application_impl.h" | 7 #include "mojo/application/public/cpp/application_impl.h" |
| 9 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" | 8 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" |
| 10 | 9 |
| 11 namespace mojo { | 10 namespace mojo { |
| 12 class ApplicationImpl; | 11 class ApplicationImpl; |
| 13 | 12 |
| 14 class ViewManagerContext::InternalState { | 13 class ViewManagerContext::InternalState { |
| 15 public: | 14 public: |
| 16 explicit InternalState(ApplicationImpl* application_impl) { | 15 explicit InternalState(ApplicationImpl* application_impl) { |
| 17 application_impl->ConnectToService("mojo:window_manager", &wm_); | 16 application_impl->ConnectToService("mojo:window_manager", &wm_); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 36 Embed(url, nullptr, nullptr); | 35 Embed(url, nullptr, nullptr); |
| 37 } | 36 } |
| 38 | 37 |
| 39 void ViewManagerContext::Embed(const String& url, | 38 void ViewManagerContext::Embed(const String& url, |
| 40 InterfaceRequest<ServiceProvider> services, | 39 InterfaceRequest<ServiceProvider> services, |
| 41 ServiceProviderPtr exposed_services) { | 40 ServiceProviderPtr exposed_services) { |
| 42 state_->wm()->Embed(url, services.Pass(), exposed_services.Pass()); | 41 state_->wm()->Embed(url, services.Pass(), exposed_services.Pass()); |
| 43 } | 42 } |
| 44 | 43 |
| 45 } // namespace mojo | 44 } // namespace mojo |
| OLD | NEW |