| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "mojo/ui/base_view.h" | 5 #include "mojo/ui/base_view.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace mojo { | 9 namespace mojo { |
| 10 namespace ui { | 10 namespace ui { |
| 11 | 11 |
| 12 BaseView::BaseView( | 12 BaseView::BaseView( |
| 13 mojo::ApplicationImpl* app_impl, | 13 mojo::ApplicationImpl* app_impl, |
| 14 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, | 14 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, |
| 15 const std::string& label) | 15 const std::string& label) |
| 16 : app_impl_(app_impl), | 16 : app_impl_(app_impl), |
| 17 view_listener_binding_(this), | 17 view_listener_binding_(this), |
| 18 view_container_listener_binding_(this) { | 18 view_container_listener_binding_(this) { |
| 19 DCHECK(app_impl_); | 19 DCHECK(app_impl_); |
| 20 app_impl_->ConnectToService("mojo:view_manager_service", &view_manager_); | 20 app_impl_->ConnectToServiceDeprecated("mojo:view_manager_service", |
| 21 &view_manager_); |
| 21 | 22 |
| 22 mojo::ui::ViewListenerPtr view_listener; | 23 mojo::ui::ViewListenerPtr view_listener; |
| 23 view_listener_binding_.Bind(mojo::GetProxy(&view_listener)); | 24 view_listener_binding_.Bind(mojo::GetProxy(&view_listener)); |
| 24 view_manager_->CreateView(mojo::GetProxy(&view_), view_owner_request.Pass(), | 25 view_manager_->CreateView(mojo::GetProxy(&view_), view_owner_request.Pass(), |
| 25 view_listener.Pass(), label); | 26 view_listener.Pass(), label); |
| 26 view_->CreateScene(mojo::GetProxy(&scene_)); | 27 view_->CreateScene(mojo::GetProxy(&scene_)); |
| 27 } | 28 } |
| 28 | 29 |
| 29 BaseView::~BaseView() {} | 30 BaseView::~BaseView() {} |
| 30 | 31 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 83 } |
| 83 | 84 |
| 84 void BaseView::OnChildUnavailable(uint32_t child_key, | 85 void BaseView::OnChildUnavailable(uint32_t child_key, |
| 85 const OnChildUnavailableCallback& callback) { | 86 const OnChildUnavailableCallback& callback) { |
| 86 OnChildUnavailable(child_key); | 87 OnChildUnavailable(child_key); |
| 87 callback.Run(); | 88 callback.Run(); |
| 88 } | 89 } |
| 89 | 90 |
| 90 } // namespace ui | 91 } // namespace ui |
| 91 } // namespace mojo | 92 } // namespace mojo |
| OLD | NEW |