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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_cursor_manager.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_
7 7
8 #include <memory>
8 #include <set> 9 #include <set>
9 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "ui/views/views_export.h" 13 #include "ui/views/views_export.h"
14 #include "ui/wm/core/native_cursor_manager.h" 14 #include "ui/wm/core/native_cursor_manager.h"
15 15
16 namespace aura { 16 namespace aura {
17 class WindowTreeHost; 17 class WindowTreeHost;
18 } 18 }
19 19
20 namespace ui { 20 namespace ui {
21 class CursorLoader; 21 class CursorLoader;
22 } 22 }
23 23
24 namespace wm { 24 namespace wm {
25 class NativeCursorManagerDelegate; 25 class NativeCursorManagerDelegate;
26 } 26 }
27 27
28 namespace views { 28 namespace views {
29 class DesktopCursorLoaderUpdater; 29 class DesktopCursorLoaderUpdater;
30 30
31 // A NativeCursorManager that performs the desktop-specific setting of cursor 31 // A NativeCursorManager that performs the desktop-specific setting of cursor
32 // state. Similar to AshNativeCursorManager, it also communicates these changes 32 // state. Similar to AshNativeCursorManager, it also communicates these changes
33 // to all root windows. 33 // to all root windows.
34 class VIEWS_EXPORT DesktopNativeCursorManager 34 class VIEWS_EXPORT DesktopNativeCursorManager
35 : public wm::NativeCursorManager { 35 : public wm::NativeCursorManager {
36 public: 36 public:
37 DesktopNativeCursorManager( 37 DesktopNativeCursorManager(
38 scoped_ptr<DesktopCursorLoaderUpdater> cursor_loader_updater); 38 std::unique_ptr<DesktopCursorLoaderUpdater> cursor_loader_updater);
39 ~DesktopNativeCursorManager() override; 39 ~DesktopNativeCursorManager() override;
40 40
41 // Builds a cursor and sets the internal platform representation. The return 41 // Builds a cursor and sets the internal platform representation. The return
42 // value should not be cached. 42 // value should not be cached.
43 gfx::NativeCursor GetInitializedCursor(int type); 43 gfx::NativeCursor GetInitializedCursor(int type);
44 44
45 // Adds |host| to the set |hosts_|. 45 // Adds |host| to the set |hosts_|.
46 void AddHost(aura::WindowTreeHost* host); 46 void AddHost(aura::WindowTreeHost* host);
47 47
48 // Removes |host| from the set |hosts_|. 48 // Removes |host| from the set |hosts_|.
(...skipping 10 matching lines...) Expand all
59 void SetCursorSet(ui::CursorSetType cursor_set, 59 void SetCursorSet(ui::CursorSetType cursor_set,
60 wm::NativeCursorManagerDelegate* delegate) override; 60 wm::NativeCursorManagerDelegate* delegate) override;
61 void SetMouseEventsEnabled( 61 void SetMouseEventsEnabled(
62 bool enabled, 62 bool enabled,
63 wm::NativeCursorManagerDelegate* delegate) override; 63 wm::NativeCursorManagerDelegate* delegate) override;
64 64
65 // The set of hosts to notify of changes in cursor state. 65 // The set of hosts to notify of changes in cursor state.
66 typedef std::set<aura::WindowTreeHost*> Hosts; 66 typedef std::set<aura::WindowTreeHost*> Hosts;
67 Hosts hosts_; 67 Hosts hosts_;
68 68
69 scoped_ptr<DesktopCursorLoaderUpdater> cursor_loader_updater_; 69 std::unique_ptr<DesktopCursorLoaderUpdater> cursor_loader_updater_;
70 scoped_ptr<ui::CursorLoader> cursor_loader_; 70 std::unique_ptr<ui::CursorLoader> cursor_loader_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(DesktopNativeCursorManager); 72 DISALLOW_COPY_AND_ASSIGN(DesktopNativeCursorManager);
73 }; 73 };
74 74
75 } // namespace views 75 } // namespace views
76 76
77 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_ 77 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_
78 78
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698