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

Side by Side Diff: ash/accelerators/magnifier_key_scroller.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/accelerators/key_hold_detector.cc ('k') | ash/accelerators/magnifier_key_scroller.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_ACCELERATORS_MAGNIFIER_KEY_SCROLLER_H_ 5 #ifndef ASH_ACCELERATORS_MAGNIFIER_KEY_SCROLLER_H_
6 #define ASH_ACCELERATORS_MAGNIFIER_KEY_SCROLLER_H_ 6 #define ASH_ACCELERATORS_MAGNIFIER_KEY_SCROLLER_H_
7 7
8 #include <memory>
9
8 #include "ash/accelerators/key_hold_detector.h" 10 #include "ash/accelerators/key_hold_detector.h"
9 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "ui/events/event_handler.h" 13 #include "ui/events/event_handler.h"
13 14
14 namespace ui { 15 namespace ui {
15 class KeyEvent; 16 class KeyEvent;
16 } 17 }
17 18
18 namespace ash { 19 namespace ash {
19 20
20 // A KeyHoldDetector delegate to control control magnified screen. 21 // A KeyHoldDetector delegate to control control magnified screen.
21 class ASH_EXPORT MagnifierKeyScroller : public KeyHoldDetector::Delegate { 22 class ASH_EXPORT MagnifierKeyScroller : public KeyHoldDetector::Delegate {
22 public: 23 public:
23 static bool IsEnabled(); 24 static bool IsEnabled();
24 static void SetEnabled(bool enabled); 25 static void SetEnabled(bool enabled);
25 static scoped_ptr<ui::EventHandler> CreateHandler(); 26 static std::unique_ptr<ui::EventHandler> CreateHandler();
26 27
27 // A scoped object to enable and disable the magnifier accelerator for test. 28 // A scoped object to enable and disable the magnifier accelerator for test.
28 class ScopedEnablerForTest { 29 class ScopedEnablerForTest {
29 public: 30 public:
30 ScopedEnablerForTest() { 31 ScopedEnablerForTest() {
31 SetEnabled(true); 32 SetEnabled(true);
32 } 33 }
33 ~ScopedEnablerForTest() { 34 ~ScopedEnablerForTest() {
34 SetEnabled(false); 35 SetEnabled(false);
35 } 36 }
(...skipping 12 matching lines...) Expand all
48 49
49 MagnifierKeyScroller(); 50 MagnifierKeyScroller();
50 ~MagnifierKeyScroller() override; 51 ~MagnifierKeyScroller() override;
51 52
52 DISALLOW_COPY_AND_ASSIGN(MagnifierKeyScroller); 53 DISALLOW_COPY_AND_ASSIGN(MagnifierKeyScroller);
53 }; 54 };
54 55
55 } // namespace ash 56 } // namespace ash
56 57
57 #endif // ASH_ACCELERATORS_MAGNIFIER_KEY_SCROLLER_H_ 58 #endif // ASH_ACCELERATORS_MAGNIFIER_KEY_SCROLLER_H_
OLDNEW
« no previous file with comments | « ash/accelerators/key_hold_detector.cc ('k') | ash/accelerators/magnifier_key_scroller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698