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

Side by Side Diff: ui/compositor/test/in_process_context_factory.cc

Issue 2369793002: WIP: Propagate SurfaceID up window tree hierarchy
Patch Set: Fix input events: EventDispatcher ignores container windows Created 4 years, 2 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
« no previous file with comments | « ui/compositor/test/in_process_context_factory.h ('k') | ui/views/mus/native_widget_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/compositor/test/in_process_context_factory.h" 5 #include "ui/compositor/test/in_process_context_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 gpu::GpuMemoryBufferManager* 232 gpu::GpuMemoryBufferManager*
233 InProcessContextFactory::GetGpuMemoryBufferManager() { 233 InProcessContextFactory::GetGpuMemoryBufferManager() {
234 return &gpu_memory_buffer_manager_; 234 return &gpu_memory_buffer_manager_;
235 } 235 }
236 236
237 cc::TaskGraphRunner* InProcessContextFactory::GetTaskGraphRunner() { 237 cc::TaskGraphRunner* InProcessContextFactory::GetTaskGraphRunner() {
238 return &task_graph_runner_; 238 return &task_graph_runner_;
239 } 239 }
240 240
241 uint32_t InProcessContextFactory::AllocateSurfaceClientId() { 241 cc::FrameSinkId InProcessContextFactory::AllocateFrameSinkId() {
242 return next_surface_client_id_++; 242 return cc::FrameSinkId(next_surface_client_id_++, 0);
243 } 243 }
244 244
245 cc::SurfaceManager* InProcessContextFactory::GetSurfaceManager() { 245 cc::SurfaceManager* InProcessContextFactory::GetSurfaceManager() {
246 return surface_manager_; 246 return surface_manager_;
247 } 247 }
248 248
249 void InProcessContextFactory::SetDisplayVisible(ui::Compositor* compositor, 249 void InProcessContextFactory::SetDisplayVisible(ui::Compositor* compositor,
250 bool visible) { 250 bool visible) {
251 if (!per_compositor_data_.count(compositor)) 251 if (!per_compositor_data_.count(compositor))
252 return; 252 return;
253 per_compositor_data_[compositor]->SetVisible(visible); 253 per_compositor_data_[compositor]->SetVisible(visible);
254 } 254 }
255 255
256 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, 256 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor,
257 const gfx::Size& size) { 257 const gfx::Size& size) {
258 if (!per_compositor_data_.count(compositor)) 258 if (!per_compositor_data_.count(compositor))
259 return; 259 return;
260 per_compositor_data_[compositor]->Resize(size); 260 per_compositor_data_[compositor]->Resize(size);
261 } 261 }
262 262
263 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) { 263 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) {
264 observer_list_.AddObserver(observer); 264 observer_list_.AddObserver(observer);
265 } 265 }
266 266
267 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) { 267 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) {
268 observer_list_.RemoveObserver(observer); 268 observer_list_.RemoveObserver(observer);
269 } 269 }
270 270
271 } // namespace ui 271 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/in_process_context_factory.h ('k') | ui/views/mus/native_widget_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698