| 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 "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "components/view_manager/client_connection.h" | 9 #include "components/view_manager/client_connection.h" |
| 10 #include "components/view_manager/connection_manager.h" | 10 #include "components/view_manager/connection_manager.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 event_source_ = ui::PlatformEventSource::CreateDefault(); | 55 event_source_ = ui::PlatformEventSource::CreateDefault(); |
| 56 if (command_line->HasSwitch(mojo::kUseTestConfig)) | 56 if (command_line->HasSwitch(mojo::kUseTestConfig)) |
| 57 gfx::GLSurfaceTestSupport::InitializeOneOff(); | 57 gfx::GLSurfaceTestSupport::InitializeOneOff(); |
| 58 else | 58 else |
| 59 gfx::GLSurface::InitializeOneOff(); | 59 gfx::GLSurface::InitializeOneOff(); |
| 60 } | 60 } |
| 61 #endif | 61 #endif |
| 62 | 62 |
| 63 if (!gpu_state_.get()) | 63 if (!gpu_state_.get()) |
| 64 gpu_state_ = new gles2::GpuState; | 64 gpu_state_ = new gles2::GpuState; |
| 65 connection_manager_.reset(new ConnectionManager(this)); | 65 connection_manager_.reset(new ConnectionManager(this, surfaces_state_)); |
| 66 } | 66 } |
| 67 | 67 |
| 68 bool ViewManagerApp::ConfigureIncomingConnection( | 68 bool ViewManagerApp::ConfigureIncomingConnection( |
| 69 ApplicationConnection* connection) { | 69 ApplicationConnection* connection) { |
| 70 // ViewManager | 70 // ViewManager |
| 71 connection->AddService<ViewManagerRoot>(this); | 71 connection->AddService<ViewManagerRoot>(this); |
| 72 // Surfaces | 72 // Surfaces |
| 73 // TODO(fsamuel): This should go away soon. | 73 // TODO(fsamuel): This should go away soon. |
| 74 connection->AddService<mojo::Surface>(this); | 74 connection->AddService<mojo::Surface>(this); |
| 75 // GPU | 75 // GPU |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 new gles2::GpuImpl(request.Pass(), gpu_state_); | 135 new gles2::GpuImpl(request.Pass(), gpu_state_); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void ViewManagerApp::Create( | 138 void ViewManagerApp::Create( |
| 139 mojo::ApplicationConnection* connection, | 139 mojo::ApplicationConnection* connection, |
| 140 mojo::InterfaceRequest<mojo::Surface> request) { | 140 mojo::InterfaceRequest<mojo::Surface> request) { |
| 141 new surfaces::SurfacesImpl(surfaces_state_, request.Pass()); | 141 new surfaces::SurfacesImpl(surfaces_state_, request.Pass()); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace view_manager | 144 } // namespace view_manager |
| OLD | NEW |