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

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

Issue 2644713002: cros: Use runtime stylus detection for ash palette. (Closed)
Patch Set: Add listeners to options and settings Created 3 years, 10 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 2017 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_STYLUS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_STYLUS_HANDLER_H_
7
8 #include "base/macros.h"
9 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
10 #include "ui/events/devices/input_device_event_observer.h"
11
12 namespace base {
13 class ListValue;
14 }
15
16 namespace chromeos {
17 namespace settings {
18
19 // Chrome OS stylus settings handler.
20 class StylusHandler : public ::settings::SettingsPageUIHandler,
21 public ui::InputDeviceEventObserver {
22 public:
23 StylusHandler();
24 ~StylusHandler() override;
25
26 // SettingsPageUIHandler implementation.
27 void RegisterMessages() override;
28 void OnJavascriptAllowed() override;
29 void OnJavascriptDisallowed() override;
30
31 private:
32 // ui::InputDeviceObserver:
33 void OnDeviceListsComplete() override;
34
35 // Called by JS to request a |SendHasStylus| call.
36 void HandleInitialize(const base::ListValue* args);
37
38 // Enables or disables the stylus UI section.
39 void SendHasStylus();
40
41 DISALLOW_COPY_AND_ASSIGN(StylusHandler);
42 };
43
44 } // namespace settings
45 } // namespace chromeos
46
47 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_STYLUS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698