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

Side by Side Diff: ash/display/window_tree_host_manager.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: 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
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 #ifndef ASH_DISPLAY_DISPLAY_CONTROLLER_H_ 5 #ifndef ASH_DISPLAY_DISPLAY_CONTROLLER_H_
6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_ 6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory>
11 #include <vector> 12 #include <vector>
12 13
13 #include "ash/ash_export.h" 14 #include "ash/ash_export.h"
14 #include "ash/display/display_manager.h" 15 #include "ash/display/display_manager.h"
15 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
16 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
17 #include "base/macros.h" 18 #include "base/macros.h"
18 #include "base/memory/scoped_ptr.h"
19 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
20 #include "base/observer_list.h" 20 #include "base/observer_list.h"
21 #include "base/time/time.h" 21 #include "base/time/time.h"
22 #include "ui/aura/window.h" 22 #include "ui/aura/window.h"
23 #include "ui/aura/window_tree_host_observer.h" 23 #include "ui/aura/window_tree_host_observer.h"
24 #include "ui/base/ime/input_method.h" 24 #include "ui/base/ime/input_method.h"
25 #include "ui/base/ime/input_method_delegate.h" 25 #include "ui/base/ime/input_method_delegate.h"
26 #include "ui/gfx/display_observer.h" 26 #include "ui/gfx/display_observer.h"
27 #include "ui/gfx/geometry/point.h" 27 #include "ui/gfx/geometry/point.h"
28 28
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 typedef std::map<int64_t, AshWindowTreeHost*> WindowTreeHostMap; 195 typedef std::map<int64_t, AshWindowTreeHost*> WindowTreeHostMap;
196 // The mapping from display ID to its window tree host. 196 // The mapping from display ID to its window tree host.
197 WindowTreeHostMap window_tree_hosts_; 197 WindowTreeHostMap window_tree_hosts_;
198 198
199 base::ObserverList<Observer, true> observers_; 199 base::ObserverList<Observer, true> observers_;
200 200
201 // Store the primary window tree host temporarily while replacing 201 // Store the primary window tree host temporarily while replacing
202 // display. 202 // display.
203 AshWindowTreeHost* primary_tree_host_for_replace_; 203 AshWindowTreeHost* primary_tree_host_for_replace_;
204 204
205 scoped_ptr<FocusActivationStore> focus_activation_store_; 205 std::unique_ptr<FocusActivationStore> focus_activation_store_;
206 206
207 scoped_ptr<CursorWindowController> cursor_window_controller_; 207 std::unique_ptr<CursorWindowController> cursor_window_controller_;
208 scoped_ptr<MirrorWindowController> mirror_window_controller_; 208 std::unique_ptr<MirrorWindowController> mirror_window_controller_;
209 209
210 scoped_ptr<ui::InputMethod> input_method_; 210 std::unique_ptr<ui::InputMethod> input_method_;
211 scoped_ptr<InputMethodEventHandler> input_method_event_handler_; 211 std::unique_ptr<InputMethodEventHandler> input_method_event_handler_;
212 212
213 // Stores the current cursor location (in native coordinates and screen 213 // Stores the current cursor location (in native coordinates and screen
214 // coordinates respectively). The locations are used to restore the cursor 214 // coordinates respectively). The locations are used to restore the cursor
215 // location when the display configuration changes and to determine whether 215 // location when the display configuration changes and to determine whether
216 // the mouse should be moved after a display configuration change. 216 // the mouse should be moved after a display configuration change.
217 gfx::Point cursor_location_in_native_coords_for_restore_; 217 gfx::Point cursor_location_in_native_coords_for_restore_;
218 gfx::Point cursor_location_in_screen_coords_for_restore_; 218 gfx::Point cursor_location_in_screen_coords_for_restore_;
219 219
220 // Stores the cursor's display. The id is used to determine whether the mouse 220 // Stores the cursor's display. The id is used to determine whether the mouse
221 // should be moved after a display configuration change. 221 // should be moved after a display configuration change.
222 int64_t cursor_display_id_for_restore_; 222 int64_t cursor_display_id_for_restore_;
223 223
224 base::WeakPtrFactory<WindowTreeHostManager> weak_ptr_factory_; 224 base::WeakPtrFactory<WindowTreeHostManager> weak_ptr_factory_;
225 225
226 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostManager); 226 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostManager);
227 }; 227 };
228 228
229 } // namespace ash 229 } // namespace ash
230 230
231 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ 231 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698