summaryrefslogtreecommitdiffstats
path: root/ash/keyboard_overlay/keyboard_overlay_view.h
diff options
context:
space:
mode:
authormazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-20 20:21:11 +0000
committermazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-20 20:21:11 +0000
commite7146cef7148efeaa5b22404e1e3f94aec14749f (patch)
tree3241a5ebcb2b378a98d7bd5919ee4579a4162616 /ash/keyboard_overlay/keyboard_overlay_view.h
parent114ade48063f3e979ea39df06d33ab4554ea4611 (diff)
downloadchromium_src-e7146cef7148efeaa5b22404e1e3f94aec14749f.zip
chromium_src-e7146cef7148efeaa5b22404e1e3f94aec14749f.tar.gz
chromium_src-e7146cef7148efeaa5b22404e1e3f94aec14749f.tar.bz2
Make VKEY_F14 and VKEY_HELP close keyboard overlay.
Also add tests to verify that the shortcuts that open the keyboard overlay close it. BUG=chrome-os-partner:16067 Review URL: https://chromiumcodereview.appspot.com/11636037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/keyboard_overlay/keyboard_overlay_view.h')
-rw-r--r--ash/keyboard_overlay/keyboard_overlay_view.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ash/keyboard_overlay/keyboard_overlay_view.h b/ash/keyboard_overlay/keyboard_overlay_view.h
index d83cb13..3e352ae 100644
--- a/ash/keyboard_overlay/keyboard_overlay_view.h
+++ b/ash/keyboard_overlay/keyboard_overlay_view.h
@@ -5,9 +5,12 @@
#ifndef ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_
#define ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_
+#include <vector>
+
#include "ash/ash_export.h"
#include "ash/wm/overlay_event_filter.h"
#include "base/compiler_specific.h"
+#include "base/gtest_prod_util.h"
#include "ui/views/controls/webview/web_dialog_view.h"
class GURL;
@@ -27,6 +30,11 @@ class ASH_EXPORT KeyboardOverlayView
: public views::WebDialogView,
public ash::internal::OverlayEventFilter::Delegate {
public:
+ struct KeyEventData {
+ ui::KeyboardCode key_code;
+ int flags;
+ };
+
KeyboardOverlayView(content::BrowserContext* context,
ui::WebDialogDelegate* delegate,
WebContentsHandler* handler);
@@ -43,9 +51,15 @@ class ASH_EXPORT KeyboardOverlayView
const GURL& url);
private:
+ FRIEND_TEST_ALL_PREFIXES(KeyboardOverlayViewTest, OpenAcceleratorsClose);
+ FRIEND_TEST_ALL_PREFIXES(KeyboardOverlayViewTest, NoRedundantCancelingKeys);
+
// Overridden from views::WidgetDelegate:
virtual void WindowClosing() OVERRIDE;
+ static void GetCancelingKeysForTesting(
+ std::vector<KeyEventData>* canceling_keys);
+
DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayView);
};