Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Side by Side Diff: services/ui/ws/gpu_host.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/ui/ws/gpu_host.h" 5 #include "services/ui/ws/gpu_host.h"
6 6
7 #include "base/memory/shared_memory.h" 7 #include "base/memory/shared_memory.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 DISALLOW_COPY_AND_ASSIGN(GpuClient); 91 DISALLOW_COPY_AND_ASSIGN(GpuClient);
92 }; 92 };
93 93
94 } // namespace 94 } // namespace
95 95
96 GpuHost::GpuHost(GpuHostDelegate* delegate) 96 GpuHost::GpuHost(GpuHostDelegate* delegate)
97 : delegate_(delegate), 97 : delegate_(delegate),
98 next_client_id_(kInternalGpuChannelClientId + 1), 98 next_client_id_(kInternalGpuChannelClientId + 1),
99 main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()), 99 main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()),
100 gpu_host_binding_(this) { 100 gpu_host_binding_(this) {
101 gpu_main_impl_ = base::MakeUnique<GpuMain>(GetProxy(&gpu_main_)); 101 gpu_main_impl_ = base::MakeUnique<GpuMain>(MakeRequest(&gpu_main_));
102 gpu_main_impl_->OnStart(); 102 gpu_main_impl_->OnStart();
103 // TODO(sad): Once GPU process is split, this would look like: 103 // TODO(sad): Once GPU process is split, this would look like:
104 // connector->ConnectToInterface("gpu", &gpu_main_); 104 // connector->ConnectToInterface("gpu", &gpu_main_);
105 gpu_main_->CreateGpuService(GetProxy(&gpu_service_), 105 gpu_main_->CreateGpuService(MakeRequest(&gpu_service_),
106 gpu_host_binding_.CreateInterfacePtrAndBind()); 106 gpu_host_binding_.CreateInterfacePtrAndBind());
107 gpu_memory_buffer_manager_ = base::MakeUnique<ServerGpuMemoryBufferManager>( 107 gpu_memory_buffer_manager_ = base::MakeUnique<ServerGpuMemoryBufferManager>(
108 gpu_service_.get(), next_client_id_++); 108 gpu_service_.get(), next_client_id_++);
109 } 109 }
110 110
111 GpuHost::~GpuHost() {} 111 GpuHost::~GpuHost() {}
112 112
113 void GpuHost::Add(mojom::GpuRequest request) { 113 void GpuHost::Add(mojom::GpuRequest request) {
114 mojo::MakeStrongBinding( 114 mojo::MakeStrongBinding(
115 base::MakeUnique<GpuClient>(next_client_id_++, &gpu_info_, 115 base::MakeUnique<GpuClient>(next_client_id_++, &gpu_info_,
(...skipping 22 matching lines...) Expand all
138 void GpuHost::DidLoseContext(bool offscreen, 138 void GpuHost::DidLoseContext(bool offscreen,
139 gpu::error::ContextLostReason reason, 139 gpu::error::ContextLostReason reason,
140 const GURL& active_url) {} 140 const GURL& active_url) {}
141 141
142 void GpuHost::StoreShaderToDisk(int32_t client_id, 142 void GpuHost::StoreShaderToDisk(int32_t client_id,
143 const std::string& key, 143 const std::string& key,
144 const std::string& shader) {} 144 const std::string& shader) {}
145 145
146 } // namespace ws 146 } // namespace ws
147 } // namespace ui 147 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/frame_generator.cc ('k') | services/ui/ws/server_window_compositor_frame_sink_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698