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

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

Issue 2644713002: cros: Use runtime stylus detection for ash palette. (Closed)
Patch Set: Fix test 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.h
diff --git a/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.h b/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.h
index c950ffffe6423c6bb9937472d9d2caedc1898f23..a21c40ec6c18ec222bb8ac61c0f821647d2e3e82 100644
--- a/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.h
+++ b/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.h
@@ -10,12 +10,19 @@
#include "base/macros.h"
#include "chrome/browser/chromeos/note_taking_helper.h"
#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
+#include "ui/events/devices/input_device_event_observer.h"
+
+namespace base {
+class ListValue;
+}
namespace chromeos {
namespace settings {
+// Chrome OS stylus settings handler.
class StylusHandler : public ::settings::SettingsPageUIHandler,
- public chromeos::NoteTakingHelper::Observer {
+ public chromeos::NoteTakingHelper::Observer,
+ public ui::InputDeviceEventObserver {
public:
StylusHandler();
~StylusHandler() override;
@@ -28,11 +35,19 @@ class StylusHandler : public ::settings::SettingsPageUIHandler,
// chromeos::NoteTakingHelper::Observer implementation.
void OnAvailableNoteTakingAppsUpdated() override;
+ // ui::InputDeviceObserver:
+ void OnDeviceListsComplete() override;
+
private:
void UpdateNoteTakingApps();
void RequestApps(const base::ListValue* unused_args);
void SetPreferredNoteTakingApp(const base::ListValue* args);
+ // Called by JS to request a |SendHasStylus| call.
+ void HandleInitialize(const base::ListValue* args);
+ // Enables or disables the stylus UI section.
+ void SendHasStylus();
+
// IDs of available note-taking apps.
std::set<std::string> note_taking_app_ids_;

Powered by Google App Engine
This is Rietveld 408576698