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

Side by Side Diff: ui/ozone/public/input_controller.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
« no previous file with comments | « ui/ozone/public/client_native_pixmap_factory.cc ('k') | ui/ozone/public/input_controller.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 UI_OZONE_PUBLIC_INPUT_CONTROLLER_H_ 5 #ifndef UI_OZONE_PUBLIC_INPUT_CONTROLLER_H_
6 #define UI_OZONE_PUBLIC_INPUT_CONTROLLER_H_ 6 #define UI_OZONE_PUBLIC_INPUT_CONTROLLER_H_
7 7
8 #include <memory>
8 #include <set> 9 #include <set>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/callback.h" 13 #include "base/callback.h"
13 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h"
16 #include "ui/ozone/ozone_base_export.h" 16 #include "ui/ozone/ozone_base_export.h"
17 17
18 namespace base { 18 namespace base {
19 class TimeDelta; 19 class TimeDelta;
20 } 20 }
21 21
22 namespace ui { 22 namespace ui {
23 23
24 enum class DomCode; 24 enum class DomCode;
25 25
26 // Platform-specific interface for controlling input devices. 26 // Platform-specific interface for controlling input devices.
27 // 27 //
28 // The object provides methods for the preference page to configure input 28 // The object provides methods for the preference page to configure input
29 // devices w.r.t. the user setting. On ChromeOS, this replaces the inputcontrol 29 // devices w.r.t. the user setting. On ChromeOS, this replaces the inputcontrol
30 // script that is originally located at /opt/google/chrome/. 30 // script that is originally located at /opt/google/chrome/.
31 class OZONE_BASE_EXPORT InputController { 31 class OZONE_BASE_EXPORT InputController {
32 public: 32 public:
33 typedef base::Callback<void(scoped_ptr<std::string>)> 33 typedef base::Callback<void(std::unique_ptr<std::string>)>
34 GetTouchDeviceStatusReply; 34 GetTouchDeviceStatusReply;
35 typedef base::Callback<void(scoped_ptr<std::vector<base::FilePath>>)> 35 typedef base::Callback<void(std::unique_ptr<std::vector<base::FilePath>>)>
36 GetTouchEventLogReply; 36 GetTouchEventLogReply;
37 37
38 InputController() {} 38 InputController() {}
39 virtual ~InputController() {} 39 virtual ~InputController() {}
40 40
41 // Functions for checking devices existence. 41 // Functions for checking devices existence.
42 virtual bool HasMouse() = 0; 42 virtual bool HasMouse() = 0;
43 virtual bool HasTouchpad() = 0; 43 virtual bool HasTouchpad() = 0;
44 44
45 // Keyboard settings. 45 // Keyboard settings.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // If |enable_filter| is true, all keys on the internal keyboard except 84 // If |enable_filter| is true, all keys on the internal keyboard except
85 // |allowed_keys| are disabled. 85 // |allowed_keys| are disabled.
86 virtual void SetInternalKeyboardFilter(bool enable_filter, 86 virtual void SetInternalKeyboardFilter(bool enable_filter,
87 std::vector<DomCode> allowed_keys) = 0; 87 std::vector<DomCode> allowed_keys) = 0;
88 88
89 private: 89 private:
90 DISALLOW_COPY_AND_ASSIGN(InputController); 90 DISALLOW_COPY_AND_ASSIGN(InputController);
91 }; 91 };
92 92
93 // Create an input controller that does nothing. 93 // Create an input controller that does nothing.
94 OZONE_BASE_EXPORT scoped_ptr<InputController> CreateStubInputController(); 94 OZONE_BASE_EXPORT std::unique_ptr<InputController> CreateStubInputController();
95 95
96 } // namespace ui 96 } // namespace ui
97 97
98 #endif // UI_OZONE_PUBLIC_INPUT_CONTROLLER_H_ 98 #endif // UI_OZONE_PUBLIC_INPUT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/ozone/public/client_native_pixmap_factory.cc ('k') | ui/ozone/public/input_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698