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

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

Issue 10442017: Rename GetRootWindow() -> GetPrimaryRootWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git-try -b linux_chromeos,win_aura Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/video_detector_unittest.cc ('k') | ash/wm/window_modality_controller_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/visibility_controller.h" 5 #include "ash/wm/visibility_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/window_animations.h" 8 #include "ash/wm/window_animations.h"
9 #include "ash/wm/window_properties.h" 9 #include "ash/wm/window_properties.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
11 #include "ui/compositor/layer.h" 11 #include "ui/compositor/layer.h"
12 12
13 namespace ash { 13 namespace ash {
14 namespace { 14 namespace {
15 bool GetChildWindowVisibilityChangesAnimated(aura::Window* window) { 15 bool GetChildWindowVisibilityChangesAnimated(aura::Window* window) {
16 if (!window) 16 if (!window)
17 return false; 17 return false;
18 return window->GetProperty( 18 return window->GetProperty(
19 internal::kChildWindowVisibilityChangesAnimatedKey); 19 internal::kChildWindowVisibilityChangesAnimatedKey);
20 } 20 }
21 } // namespace 21 } // namespace
22 22
23 namespace internal { 23 namespace internal {
24 24
25 VisibilityController::VisibilityController() { 25 VisibilityController::VisibilityController() {
26 aura::client::SetVisibilityClient(Shell::GetRootWindow(), this); 26 aura::client::SetVisibilityClient(Shell::GetPrimaryRootWindow(), this);
27 } 27 }
28 28
29 VisibilityController::~VisibilityController() { 29 VisibilityController::~VisibilityController() {
30 } 30 }
31 31
32 void VisibilityController::UpdateLayerVisibility(aura::Window* window, 32 void VisibilityController::UpdateLayerVisibility(aura::Window* window,
33 bool visible) { 33 bool visible) {
34 bool animated = GetChildWindowVisibilityChangesAnimated(window->parent()) && 34 bool animated = GetChildWindowVisibilityChangesAnimated(window->parent()) &&
35 window->type() != aura::client::WINDOW_TYPE_CONTROL && 35 window->type() != aura::client::WINDOW_TYPE_CONTROL &&
36 window->type() != aura::client::WINDOW_TYPE_UNKNOWN; 36 window->type() != aura::client::WINDOW_TYPE_UNKNOWN;
(...skipping 15 matching lines...) Expand all
52 window->layer()->SetVisible(visible); 52 window->layer()->SetVisible(visible);
53 } 53 }
54 54
55 } // namespace internal 55 } // namespace internal
56 56
57 void SetChildWindowVisibilityChangesAnimated(aura::Window* window) { 57 void SetChildWindowVisibilityChangesAnimated(aura::Window* window) {
58 window->SetProperty(internal::kChildWindowVisibilityChangesAnimatedKey, true); 58 window->SetProperty(internal::kChildWindowVisibilityChangesAnimatedKey, true);
59 } 59 }
60 60
61 } // namespace ash 61 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/video_detector_unittest.cc ('k') | ash/wm/window_modality_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698