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

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

Issue 115153002: wm: public window_types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ozone deps Created 7 years 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/panels/panel_window_resizer_unittest.cc ('k') | ash/wm/solo_window_tracker_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 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 return true; 50 return true;
51 } 51 }
52 52
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() == ui::wm::WINDOW_TYPE_NORMAL && window->layer() &&
60 window->layer() && 60 window->layer()->type() != ui::LAYER_NOT_DRAWN &&
61 window->layer()->type() != ui::LAYER_NOT_DRAWN && 61 window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_NONE &&
62 window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_NONE && 62 !window->GetProperty(aura::client::kConstrainedWindowKey);
63 !window->GetProperty(aura::client::kConstrainedWindowKey);
64 } 63 }
65 64
66 // Schedule's a paint of the window's entire bounds. 65 // Schedule's a paint of the window's entire bounds.
67 void SchedulePaint(aura::Window* window) { 66 void SchedulePaint(aura::Window* window) {
68 window->SchedulePaintInRect(gfx::Rect(window->bounds().size())); 67 window->SchedulePaintInRect(gfx::Rect(window->bounds().size()));
69 } 68 }
70 69
71 } // namespace 70 } // namespace
72 71
73 72
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 UpdateSoloWindow(NULL); 200 UpdateSoloWindow(NULL);
202 } 201 }
203 202
204 void SoloWindowTracker::OnDockBoundsChanging(const gfx::Rect& new_bounds, 203 void SoloWindowTracker::OnDockBoundsChanging(const gfx::Rect& new_bounds,
205 Reason reason) { 204 Reason reason) {
206 dock_bounds_ = new_bounds; 205 dock_bounds_ = new_bounds;
207 UpdateSoloWindow(NULL); 206 UpdateSoloWindow(NULL);
208 } 207 }
209 208
210 } // namespace ash 209 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_window_resizer_unittest.cc ('k') | ash/wm/solo_window_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698