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/view_manager_app.h" | 5 #include "components/view_manager/view_manager_app.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "components/view_manager/client_connection.h" | 8 #include "components/view_manager/client_connection.h" |
9 #include "components/view_manager/connection_manager.h" | 9 #include "components/view_manager/connection_manager.h" |
10 #include "components/view_manager/public/cpp/args.h" | 10 #include "components/view_manager/public/cpp/args.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 bool ViewManagerApp::ConfigureIncomingConnection( | 62 bool ViewManagerApp::ConfigureIncomingConnection( |
63 ApplicationConnection* connection) { | 63 ApplicationConnection* connection) { |
64 connection->AddService<ViewManagerRoot>(this); | 64 connection->AddService<ViewManagerRoot>(this); |
65 connection->AddService<Gpu>(this); | 65 connection->AddService<Gpu>(this); |
66 | 66 |
67 return true; | 67 return true; |
68 } | 68 } |
69 | 69 |
70 void ViewManagerApp::OnNoMoreRootConnections() { | 70 void ViewManagerApp::OnNoMoreRootConnections() { |
71 app_impl_->Terminate(); | 71 app_impl_->Quit(); |
72 } | 72 } |
73 | 73 |
74 ClientConnection* ViewManagerApp::CreateClientConnectionForEmbedAtView( | 74 ClientConnection* ViewManagerApp::CreateClientConnectionForEmbedAtView( |
75 ConnectionManager* connection_manager, | 75 ConnectionManager* connection_manager, |
76 mojo::InterfaceRequest<mojo::ViewManagerService> service_request, | 76 mojo::InterfaceRequest<mojo::ViewManagerService> service_request, |
77 mojo::ConnectionSpecificId creator_id, | 77 mojo::ConnectionSpecificId creator_id, |
78 mojo::URLRequestPtr request, | 78 mojo::URLRequestPtr request, |
79 const ViewId& root_id) { | 79 const ViewId& root_id) { |
80 mojo::ViewManagerClientPtr client; | 80 mojo::ViewManagerClientPtr client; |
81 app_impl_->ConnectToService(request.Pass(), &client); | 81 app_impl_->ConnectToService(request.Pass(), &client); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 void ViewManagerApp::Create( | 119 void ViewManagerApp::Create( |
120 mojo::ApplicationConnection* connection, | 120 mojo::ApplicationConnection* connection, |
121 mojo::InterfaceRequest<Gpu> request) { | 121 mojo::InterfaceRequest<Gpu> request) { |
122 if (!gpu_state_.get()) | 122 if (!gpu_state_.get()) |
123 gpu_state_ = new gles2::GpuState; | 123 gpu_state_ = new gles2::GpuState; |
124 new gles2::GpuImpl(request.Pass(), gpu_state_); | 124 new gles2::GpuImpl(request.Pass(), gpu_state_); |
125 } | 125 } |
126 | 126 |
127 } // namespace view_manager | 127 } // namespace view_manager |
OLD | NEW |