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

Unified Diff: chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.cc

Issue 1961133004: MD Settings: Add remaining buttons to keyboard subpage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: closure Created 4 years, 7 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_keyboard_handler.cc
diff --git a/chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.cc b/chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.cc
index 26a806f9593c70d15a7e7289dff0f1c99a7a48b1..d2a9f317a36ff6a0a6fd5186f1c473bf09f0879a 100644
--- a/chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.h"
+#include "ash/new_window_delegate.h"
+#include "ash/shell.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/values.h"
@@ -44,6 +46,10 @@ void KeyboardHandler::RegisterMessages() {
"initializeKeyboardSettings",
base::Bind(&KeyboardHandler::HandleInitialize,
base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ "showKeyboardShortcutsOverlay",
+ base::Bind(&KeyboardHandler::HandleShowKeyboardShortcutsOverlay,
+ base::Unretained(this)));
}
void KeyboardHandler::OnKeyboardDeviceConfigurationChanged() {
@@ -54,6 +60,11 @@ void KeyboardHandler::HandleInitialize(const base::ListValue* args) {
UpdateShowKeys();
}
+void KeyboardHandler::HandleShowKeyboardShortcutsOverlay(
+ const base::ListValue* args) const {
+ ash::Shell::GetInstance()->new_window_delegate()->ShowKeyboardOverlay();
+}
+
void KeyboardHandler::UpdateShowKeys() const {
const base::FundamentalValue has_caps_lock(HasExternalKeyboard());
const base::FundamentalValue has_diamond_key(

Powered by Google App Engine
This is Rietveld 408576698