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

Unified Diff: chrome/browser/ui/views/apps/keyboard_hook_handler.cc

Issue 297123002: API proposal for chrome.app.window to intercept all keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use WidgetObserver instead of plumbing SetKeyboardIntercept through view::Widget Created 6 years, 1 month 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/views/apps/keyboard_hook_handler.cc
diff --git a/chrome/browser/ui/views/apps/keyboard_hook_handler.cc b/chrome/browser/ui/views/apps/keyboard_hook_handler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..51adb093eab336200975c75f4eed9eb0d7ff02e3
--- /dev/null
+++ b/chrome/browser/ui/views/apps/keyboard_hook_handler.cc
@@ -0,0 +1,20 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
benwells 2014/11/21 00:52:01 Nit: no (c)
Sriram 2014/11/21 05:35:21 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/views/apps/keyboard_hook_handler.h"
+
+#include "base/memory/singleton.h"
+
+// TODO(sriramsr): Implement for other platforms.
+// Empty implementation for other platform.
benwells 2014/11/21 00:52:01 Nit: platformS
Sriram 2014/11/21 05:35:21 Done.
+void KeyboardHookHandler::Register(views::Widget* widget) {
+}
+
+void KeyboardHookHandler::Deregister(views::Widget* widget) {
+}
+
+KeyboardHookHandler* KeyboardHookHandler::GetInstance() {
benwells 2014/11/21 00:52:01 nit: // static on line above.
Sriram 2014/11/21 05:35:21 Done.
+ return Singleton<KeyboardHookHandler,
+ DefaultSingletonTraits<KeyboardHookHandler>>::get();
+}

Powered by Google App Engine
This is Rietveld 408576698