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

Side by Side Diff: ash/wm/window_animations.cc

Issue 2144733005: [WIP] cc: Plumb SurfaceId from clients Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure only SurfaceFactoy and tests can update hierarchy Created 4 years, 5 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 | « ash/sysui/stub_context_factory.cc ('k') | cc/surfaces/display_unittest.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/wm/window_animations.h" 5 #include "ash/wm/window_animations.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 window_->AddObserver(this); 271 window_->AddObserver(this);
272 layer_owner_->root()->GetCompositor()->AddObserver(this); 272 layer_owner_->root()->GetCompositor()->AddObserver(this);
273 } 273 }
274 ~CrossFadeObserver() override { 274 ~CrossFadeObserver() override {
275 window_->RemoveObserver(this); 275 window_->RemoveObserver(this);
276 window_ = NULL; 276 window_ = NULL;
277 layer_owner_->root()->GetCompositor()->RemoveObserver(this); 277 layer_owner_->root()->GetCompositor()->RemoveObserver(this);
278 } 278 }
279 279
280 // ui::CompositorObserver overrides: 280 // ui::CompositorObserver overrides:
281 void OnCompositingInitialized(ui::Compositor* compositor) override {}
281 void OnCompositingDidCommit(ui::Compositor* compositor) override {} 282 void OnCompositingDidCommit(ui::Compositor* compositor) override {}
282 void OnCompositingStarted(ui::Compositor* compositor, 283 void OnCompositingStarted(ui::Compositor* compositor,
283 base::TimeTicks start_time) override {} 284 base::TimeTicks start_time) override {}
284 void OnCompositingEnded(ui::Compositor* compositor) override {} 285 void OnCompositingEnded(ui::Compositor* compositor) override {}
285 void OnCompositingAborted(ui::Compositor* compositor) override { 286 void OnCompositingAborted(ui::Compositor* compositor) override {
286 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. 287 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us.
287 layer_owner_->root()->GetAnimator()->StopAnimating(); 288 layer_owner_->root()->GetAnimator()->StopAnimating();
288 } 289 }
289 void OnCompositingLockStateChanged(ui::Compositor* compositor) override {} 290 void OnCompositingLockStateChanged(ui::Compositor* compositor) override {}
290 void OnCompositingShuttingDown(ui::Compositor* compositor) override {} 291 void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 gfx::Rect work_area = 483 gfx::Rect work_area =
483 display::Screen::GetScreen()->GetDisplayNearestWindow(window).work_area(); 484 display::Screen::GetScreen()->GetDisplayNearestWindow(window).work_area();
484 int ltr_adjusted_x = base::i18n::IsRTL() ? work_area.right() : work_area.x(); 485 int ltr_adjusted_x = base::i18n::IsRTL() ? work_area.right() : work_area.x();
485 return shelf->SelectValueForShelfAlignment( 486 return shelf->SelectValueForShelfAlignment(
486 gfx::Rect(ltr_adjusted_x, work_area.bottom(), 0, 0), 487 gfx::Rect(ltr_adjusted_x, work_area.bottom(), 0, 0),
487 gfx::Rect(work_area.x(), work_area.y(), 0, 0), 488 gfx::Rect(work_area.x(), work_area.y(), 0, 0),
488 gfx::Rect(work_area.right(), work_area.y(), 0, 0)); 489 gfx::Rect(work_area.right(), work_area.y(), 0, 0));
489 } 490 }
490 491
491 } // namespace ash 492 } // namespace ash
OLDNEW
« no previous file with comments | « ash/sysui/stub_context_factory.cc ('k') | cc/surfaces/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698