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

Unified Diff: ui/views/widget/desktop_aura/desktop_keyboard_capture_win.h

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: Updated based on sky's comments Created 6 years, 5 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: ui/views/widget/desktop_aura/desktop_keyboard_capture_win.h
diff --git a/ui/views/widget/desktop_aura/desktop_keyboard_capture_win.h b/ui/views/widget/desktop_aura/desktop_keyboard_capture_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..11df053682aedd93319df770d059f2e355c621fa
--- /dev/null
+++ b/ui/views/widget/desktop_aura/desktop_keyboard_capture_win.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_WIDGET_DESKTOP_KEYBOARD_CAPTURE_WIN_H_
+#define UI_VIEWS_WIDGET_DESKTOP_KEYBOARD_CAPTURE_WIN_H_
+
+#include "ui/gfx/native_widget_types.h"
+#include "ui/views/views_export.h"
+
+namespace views {
+// This class maintains registration of keyboard hooks and routing the low level
+// callback.
+class VIEWS_EXPORT DesktopKeyboardCaptureWin {
+ public:
+ DesktopKeyboardCaptureWin(HWND window_handle);
sky 2014/07/31 21:36:56 explicit.
Sriram 2014/07/31 22:54:18 Done.
+ ~DesktopKeyboardCaptureWin();
+
+ bool Capture();
sky 2014/07/31 21:36:55 Make the constructor capture and the destructor re
Sriram 2014/07/31 22:54:18 Done.
+ void Release();
+
+ private:
+ bool registered_;
+ HWND window_handle_;
+};
sky 2014/07/31 21:36:55 DISALLOW...
Sriram 2014/07/31 22:54:18 Done.
+}
+
+#endif // UI_VIEWS_WIDGET_DESKTOP_KEYBOARD_CAPTURE_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698