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

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

Issue 14297013: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/toplevel_window_event_handler.cc ('k') | ash/wm/workspace/frame_maximize_button.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_cycle_controller.h" 5 #include "ash/wm/window_cycle_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/shell_delegate.h" 9 #include "ash/shell_delegate.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 void WindowCycleController::Step(Direction direction) { 243 void WindowCycleController::Step(Direction direction) {
244 DCHECK(windows_.get()); 244 DCHECK(windows_.get());
245 windows_->Step(direction == FORWARD ? WindowCycleList::FORWARD : 245 windows_->Step(direction == FORWARD ? WindowCycleList::FORWARD :
246 WindowCycleList::BACKWARD); 246 WindowCycleList::BACKWARD);
247 } 247 }
248 248
249 void WindowCycleController::StopCycling() { 249 void WindowCycleController::StopCycling() {
250 windows_.reset(); 250 windows_.reset();
251 // Remove our key event filter. 251 // Remove our key event filter.
252 if (event_handler_.get()) { 252 if (event_handler_) {
253 Shell::GetInstance()->RemovePreTargetHandler(event_handler_.get()); 253 Shell::GetInstance()->RemovePreTargetHandler(event_handler_.get());
254 event_handler_.reset(); 254 event_handler_.reset();
255 } 255 }
256 256
257 // Add the currently focused window to the MRU list 257 // Add the currently focused window to the MRU list
258 aura::Window* active_window = wm::GetActiveWindow(); 258 aura::Window* active_window = wm::GetActiveWindow();
259 mru_windows_.remove(active_window); 259 mru_windows_.remove(active_window);
260 mru_windows_.push_front(active_window); 260 mru_windows_.push_front(active_window);
261 } 261 }
262 262
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 mru_windows_.remove(window); 295 mru_windows_.remove(window);
296 if (window->id() == internal::kShellWindowId_WorkspaceContainer) 296 if (window->id() == internal::kShellWindowId_WorkspaceContainer)
297 window->RemoveObserver(this); 297 window->RemoveObserver(this);
298 } 298 }
299 299
300 void WindowCycleController::OnWindowDestroying(aura::Window* window) { 300 void WindowCycleController::OnWindowDestroying(aura::Window* window) {
301 window->RemoveObserver(this); 301 window->RemoveObserver(this);
302 } 302 }
303 303
304 } // namespace ash 304 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/toplevel_window_event_handler.cc ('k') | ash/wm/workspace/frame_maximize_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698