OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/solo_window_tracker.h" | 5 #include "ash/wm/solo_window_tracker.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/ash_constants.h" | 9 #include "ash/ash_constants.h" |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // Returns true if |window| can use the solo window header. Returns false for | 53 // Returns true if |window| can use the solo window header. Returns false for |
54 // windows that are: | 54 // windows that are: |
55 // * Not drawn (for example, DragDropTracker uses one for mouse capture) | 55 // * Not drawn (for example, DragDropTracker uses one for mouse capture) |
56 // * Modal alerts (it looks odd for headers to change when an alert opens) | 56 // * Modal alerts (it looks odd for headers to change when an alert opens) |
57 // * Constrained windows (ditto) | 57 // * Constrained windows (ditto) |
58 bool IsValidCandidate(aura::Window* window) { | 58 bool IsValidCandidate(aura::Window* window) { |
59 return window->type() == aura::client::WINDOW_TYPE_NORMAL && | 59 return window->type() == aura::client::WINDOW_TYPE_NORMAL && |
60 window->layer() && | 60 window->layer() && |
61 window->layer()->type() != ui::LAYER_NOT_DRAWN && | 61 window->layer()->type() != ui::LAYER_NOT_DRAWN && |
62 window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_NONE && | 62 window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_NONE && |
63 !window->GetProperty(ash::kConstrainedWindowKey); | 63 !window->GetProperty(aura::client::kConstrainedWindowKey); |
64 } | 64 } |
65 | 65 |
66 // Schedule's a paint of the window's entire bounds. | 66 // Schedule's a paint of the window's entire bounds. |
67 void SchedulePaint(aura::Window* window) { | 67 void SchedulePaint(aura::Window* window) { |
68 window->SchedulePaintInRect(gfx::Rect(window->bounds().size())); | 68 window->SchedulePaintInRect(gfx::Rect(window->bounds().size())); |
69 } | 69 } |
70 | 70 |
71 } // namespace | 71 } // namespace |
72 | 72 |
73 | 73 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 UpdateSoloWindow(NULL); | 201 UpdateSoloWindow(NULL); |
202 } | 202 } |
203 | 203 |
204 void SoloWindowTracker::OnDockBoundsChanging(const gfx::Rect& new_bounds, | 204 void SoloWindowTracker::OnDockBoundsChanging(const gfx::Rect& new_bounds, |
205 Reason reason) { | 205 Reason reason) { |
206 dock_bounds_ = new_bounds; | 206 dock_bounds_ = new_bounds; |
207 UpdateSoloWindow(NULL); | 207 UpdateSoloWindow(NULL); |
208 } | 208 } |
209 | 209 |
210 } // namespace ash | 210 } // namespace ash |
OLD | NEW |