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

Side by Side Diff: ash/wm/overview/window_selector.cc

Issue 24108003: [Cleanup] Rename WindowSettings to WindowState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase fix Created 7 years, 3 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/gestures/two_finger_drag_handler.cc ('k') | ash/wm/panels/panel_layout_manager.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/overview/window_selector.h" 5 #include "ash/wm/overview/window_selector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/mru_window_tracker.h" 10 #include "ash/wm/mru_window_tracker.h"
11 #include "ash/wm/overview/window_overview.h" 11 #include "ash/wm/overview/window_overview.h"
12 #include "ash/wm/overview/window_selector_delegate.h" 12 #include "ash/wm/overview/window_selector_delegate.h"
13 #include "ash/wm/overview/window_selector_panels.h" 13 #include "ash/wm/overview/window_selector_panels.h"
14 #include "ash/wm/overview/window_selector_window.h" 14 #include "ash/wm/overview/window_selector_window.h"
15 #include "ash/wm/window_settings.h" 15 #include "ash/wm/window_state.h"
16 #include "base/auto_reset.h" 16 #include "base/auto_reset.h"
17 #include "base/timer/timer.h" 17 #include "base/timer/timer.h"
18 #include "ui/aura/client/activation_client.h" 18 #include "ui/aura/client/activation_client.h"
19 #include "ui/aura/client/focus_client.h" 19 #include "ui/aura/client/focus_client.h"
20 #include "ui/aura/root_window.h" 20 #include "ui/aura/root_window.h"
21 #include "ui/aura/window.h" 21 #include "ui/aura/window.h"
22 #include "ui/events/event.h" 22 #include "ui/events/event.h"
23 #include "ui/events/event_handler.h" 23 #include "ui/events/event_handler.h"
24 24
25 namespace ash { 25 namespace ash {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 selected_window_(0), 105 selected_window_(0),
106 restore_focus_window_(NULL), 106 restore_focus_window_(NULL),
107 restoring_focus_(false) { 107 restoring_focus_(false) {
108 DCHECK(delegate_); 108 DCHECK(delegate_);
109 std::vector<WindowSelectorPanels*> panels_items; 109 std::vector<WindowSelectorPanels*> panels_items;
110 for (size_t i = 0; i < windows.size(); ++i) { 110 for (size_t i = 0; i < windows.size(); ++i) {
111 windows[i]->AddObserver(this); 111 windows[i]->AddObserver(this);
112 observed_windows_.insert(windows[i]); 112 observed_windows_.insert(windows[i]);
113 113
114 if (windows[i]->type() == aura::client::WINDOW_TYPE_PANEL && 114 if (windows[i]->type() == aura::client::WINDOW_TYPE_PANEL &&
115 wm::GetWindowSettings(windows[i])->panel_attached()) { 115 wm::GetWindowState(windows[i])->panel_attached()) {
116 // Attached panel windows are grouped into a single overview item per 116 // Attached panel windows are grouped into a single overview item per
117 // root window (display). 117 // root window (display).
118 std::vector<WindowSelectorPanels*>::iterator iter = 118 std::vector<WindowSelectorPanels*>::iterator iter =
119 std::find_if(panels_items.begin(), panels_items.end(), 119 std::find_if(panels_items.begin(), panels_items.end(),
120 WindowSelectorItemForRoot(windows[i]->GetRootWindow())); 120 WindowSelectorItemForRoot(windows[i]->GetRootWindow()));
121 WindowSelectorPanels* panels_item = NULL; 121 WindowSelectorPanels* panels_item = NULL;
122 if (iter == panels_items.end()) { 122 if (iter == panels_items.end()) {
123 panels_item = new WindowSelectorPanels(); 123 panels_item = new WindowSelectorPanels();
124 panels_items.push_back(panels_item); 124 panels_items.push_back(panels_item);
125 windows_.push_back(panels_item); 125 windows_.push_back(panels_item);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // If the window is in the observed_windows_ list it needs to continue to be 308 // If the window is in the observed_windows_ list it needs to continue to be
309 // observed. 309 // observed.
310 if (observed_windows_.find(restore_focus_window_) == 310 if (observed_windows_.find(restore_focus_window_) ==
311 observed_windows_.end()) { 311 observed_windows_.end()) {
312 restore_focus_window_->RemoveObserver(this); 312 restore_focus_window_->RemoveObserver(this);
313 } 313 }
314 restore_focus_window_ = NULL; 314 restore_focus_window_ = NULL;
315 } 315 }
316 316
317 } // namespace ash 317 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/gestures/two_finger_drag_handler.cc ('k') | ash/wm/panels/panel_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698