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

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

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 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
« no previous file with comments | « ash/wm/window_animations_unittest.cc ('k') | ash/wm/window_cycle_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef ASH_WM_WINDOW_CYCLE_CONTROLLER_H_ 5 #ifndef ASH_WM_WINDOW_CYCLE_CONTROLLER_H_
6 #define ASH_WM_WINDOW_CYCLE_CONTROLLER_H_ 6 #define ASH_WM_WINDOW_CYCLE_CONTROLLER_H_
7 7
8 #include <memory>
9
8 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/time/time.h" 12 #include "base/time/time.h"
12 13
13 namespace ui { 14 namespace ui {
14 class EventHandler; 15 class EventHandler;
15 } 16 }
16 17
17 namespace aura { 18 namespace aura {
18 class Window; 19 class Window;
19 } // namespace aura 20 } // namespace aura
20 21
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 59
59 // Returns the WindowCycleList. Really only useful for testing. 60 // Returns the WindowCycleList. Really only useful for testing.
60 const WindowCycleList* window_cycle_list() const { 61 const WindowCycleList* window_cycle_list() const {
61 return window_cycle_list_.get(); 62 return window_cycle_list_.get();
62 } 63 }
63 64
64 private: 65 private:
65 // Cycles to the next or previous window based on |direction|. 66 // Cycles to the next or previous window based on |direction|.
66 void Step(Direction direction); 67 void Step(Direction direction);
67 68
68 scoped_ptr<WindowCycleList> window_cycle_list_; 69 std::unique_ptr<WindowCycleList> window_cycle_list_;
69 70
70 // Tracks what Window was active when starting to cycle and used to determine 71 // Tracks what Window was active when starting to cycle and used to determine
71 // if the active Window changed in when ending cycling. 72 // if the active Window changed in when ending cycling.
72 aura::Window* active_window_before_window_cycle_ = nullptr; 73 aura::Window* active_window_before_window_cycle_ = nullptr;
73 74
74 // Event handler to watch for release of alt key. 75 // Event handler to watch for release of alt key.
75 scoped_ptr<ui::EventHandler> event_handler_; 76 std::unique_ptr<ui::EventHandler> event_handler_;
76 77
77 base::Time cycle_start_time_; 78 base::Time cycle_start_time_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(WindowCycleController); 80 DISALLOW_COPY_AND_ASSIGN(WindowCycleController);
80 }; 81 };
81 82
82 } // namespace ash 83 } // namespace ash
83 84
84 #endif // ASH_WM_WINDOW_CYCLE_CONTROLLER_H_ 85 #endif // ASH_WM_WINDOW_CYCLE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/wm/window_animations_unittest.cc ('k') | ash/wm/window_cycle_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698