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

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

Issue 2238693002: Plumb SetVisible from ui::Compositor to the DirectRenderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: setvisible-browser: onemore Created 4 years, 4 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 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 } 248 }
249 249
250 uint32_t InProcessContextFactory::AllocateSurfaceClientId() { 250 uint32_t InProcessContextFactory::AllocateSurfaceClientId() {
251 return next_surface_client_id_++; 251 return next_surface_client_id_++;
252 } 252 }
253 253
254 cc::SurfaceManager* InProcessContextFactory::GetSurfaceManager() { 254 cc::SurfaceManager* InProcessContextFactory::GetSurfaceManager() {
255 return surface_manager_; 255 return surface_manager_;
256 } 256 }
257 257
258 void InProcessContextFactory::SetDisplayVisible(ui::Compositor* compositor,
259 bool visible) {
260 if (!per_compositor_data_.count(compositor))
261 return;
262 per_compositor_data_[compositor]->SetVisible(visible);
263 }
264
258 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, 265 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor,
259 const gfx::Size& size) { 266 const gfx::Size& size) {
260 if (!per_compositor_data_.count(compositor)) 267 if (!per_compositor_data_.count(compositor))
261 return; 268 return;
262 per_compositor_data_[compositor]->Resize(size); 269 per_compositor_data_[compositor]->Resize(size);
263 } 270 }
264 271
265 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) { 272 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) {
266 observer_list_.AddObserver(observer); 273 observer_list_.AddObserver(observer);
267 } 274 }
268 275
269 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) { 276 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) {
270 observer_list_.RemoveObserver(observer); 277 observer_list_.RemoveObserver(observer);
271 } 278 }
272 279
273 } // namespace ui 280 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/in_process_context_factory.h ('k') | ui/compositor/test/test_compositor_host_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698