OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_ | 5 #ifndef ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_ |
6 #define ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_ | 6 #define ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/content_support/ash_with_content_export.h" | 10 #include "ash/content_support/ash_with_content_export.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 public ash::OverlayEventFilter::Delegate { | 31 public ash::OverlayEventFilter::Delegate { |
32 public: | 32 public: |
33 struct KeyEventData { | 33 struct KeyEventData { |
34 ui::KeyboardCode key_code; | 34 ui::KeyboardCode key_code; |
35 int flags; | 35 int flags; |
36 }; | 36 }; |
37 | 37 |
38 KeyboardOverlayView(content::BrowserContext* context, | 38 KeyboardOverlayView(content::BrowserContext* context, |
39 ui::WebDialogDelegate* delegate, | 39 ui::WebDialogDelegate* delegate, |
40 WebContentsHandler* handler); | 40 WebContentsHandler* handler); |
41 virtual ~KeyboardOverlayView(); | 41 ~KeyboardOverlayView() override; |
42 | 42 |
43 // Overridden from ash::OverlayEventFilter::Delegate: | 43 // Overridden from ash::OverlayEventFilter::Delegate: |
44 virtual void Cancel() override; | 44 void Cancel() override; |
45 virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) override; | 45 bool IsCancelingKeyEvent(ui::KeyEvent* event) override; |
46 virtual aura::Window* GetWindow() override; | 46 aura::Window* GetWindow() override; |
47 | 47 |
48 // Shows the keyboard overlay. | 48 // Shows the keyboard overlay. |
49 static void ShowDialog(content::BrowserContext* context, | 49 static void ShowDialog(content::BrowserContext* context, |
50 WebContentsHandler* handler, | 50 WebContentsHandler* handler, |
51 const GURL& url); | 51 const GURL& url); |
52 | 52 |
53 private: | 53 private: |
54 FRIEND_TEST_ALL_PREFIXES(KeyboardOverlayViewTest, OpenAcceleratorsClose); | 54 FRIEND_TEST_ALL_PREFIXES(KeyboardOverlayViewTest, OpenAcceleratorsClose); |
55 FRIEND_TEST_ALL_PREFIXES(KeyboardOverlayViewTest, NoRedundantCancelingKeys); | 55 FRIEND_TEST_ALL_PREFIXES(KeyboardOverlayViewTest, NoRedundantCancelingKeys); |
56 | 56 |
57 // Overridden from views::WidgetDelegate: | 57 // Overridden from views::WidgetDelegate: |
58 virtual void WindowClosing() override; | 58 void WindowClosing() override; |
59 | 59 |
60 static void GetCancelingKeysForTesting( | 60 static void GetCancelingKeysForTesting( |
61 std::vector<KeyEventData>* canceling_keys); | 61 std::vector<KeyEventData>* canceling_keys); |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayView); | 63 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayView); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace ash | 66 } // namespace ash |
67 | 67 |
68 #endif // ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_ | 68 #endif // ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_ |
OLD | NEW |