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

Side by Side Diff: chrome/browser/ui/webui/settings/chromeos/device_pointer_handler.h

Issue 2110833003: MD Settings: Add mouse settings, update pointer settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PointersFake
Patch Set: Created 4 years, 5 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_POINTER_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_POINTER_HANDLER_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "chrome/browser/chromeos/system/pointer_device_observer.h"
12 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
13
14 namespace base {
15 class ListValue;
16 }
17
18 namespace chromeos {
19 namespace settings {
20
21 // Chrome OS "Mouse and touchpad" settings page UI handler.
22 class PointerHandler
23 : public ::settings::SettingsPageUIHandler,
24 public chromeos::system::PointerDeviceObserver::Observer {
25 public:
26 PointerHandler();
27 ~PointerHandler() override;
28
29 // SettingsPageUIHandler implementation.
30 void RegisterMessages() override;
31 void OnJavascriptAllowed() override;
32 void OnJavascriptDisallowed() override;
33
34 private:
35 // Initializes the page with the current pointer information.
36 void HandleInitialize(const base::ListValue* args);
37
38 // PointerDeviceObserver implementation.
39 void TouchpadExists(bool exists) override;
40 void MouseExists(bool exists) override;
41
42 bool has_touchpad_;
43 bool has_mouse_;
44
45 std::unique_ptr<chromeos::system::PointerDeviceObserver>
46 pointer_device_observer_;
47
48 DISALLOW_COPY_AND_ASSIGN(PointerHandler);
49 };
50
51 } // namespace settings
52 } // namespace chromeos
53
54 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_POINTER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698