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

Unified Diff: chrome/browser/ui/webui/options/chromeos/options_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/options/chromeos/options_stylus_handler.h
diff --git a/chrome/browser/ui/webui/options/chromeos/options_stylus_handler.h b/chrome/browser/ui/webui/options/chromeos/options_stylus_handler.h
index a35595a29286994bbf68c80ee1ed691702e4bdfd..6e729c69959fffbe8f16ade8644cfd22c6376f31 100644
--- a/chrome/browser/ui/webui/options/chromeos/options_stylus_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/options_stylus_handler.h
@@ -12,6 +12,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/chromeos/note_taking_helper.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
+#include "ui/events/devices/input_device_event_observer.h"
namespace base {
class ListValue;
@@ -22,7 +23,8 @@ namespace options {
// Stylus-specific options C++ code.
class OptionsStylusHandler : public ::options::OptionsPageUIHandler,
- public NoteTakingHelper::Observer {
+ public NoteTakingHelper::Observer,
+ public ui::InputDeviceEventObserver {
public:
OptionsStylusHandler();
~OptionsStylusHandler() override;
@@ -35,7 +37,17 @@ class OptionsStylusHandler : public ::options::OptionsPageUIHandler,
// NoteTakingHelper::Observer implementation.
void OnAvailableNoteTakingAppsUpdated() override;
+ // ui::InputDeviceEventObserver implementation:
+ void OnDeviceListsComplete() override;
+
private:
+ // Called from WebUI when the page is initialized to determine if stylus
+ // settings should be shown.
+ void RequestStylusHardwareState(const base::ListValue* args);
+
+ // Sends if there is a stylus device to WebUI.
+ void SendHasStylus();
+
// Updates the note-taking app menu in the stylus overlay to display the
// currently-available set of apps.
void UpdateNoteTakingApps();
« no previous file with comments | « chrome/browser/ui/ash/palette_delegate_chromeos.cc ('k') | chrome/browser/ui/webui/options/chromeos/options_stylus_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698