| 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 "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/wm/overlay_event_filter.h" | 9 #include "ash/wm/overlay_event_filter.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "ui/views/controls/webview/web_dialog_view.h" | 11 #include "ui/views/controls/webview/web_dialog_view.h" |
| 12 | 12 |
| 13 class GURL; | 13 class GURL; |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 class BrowserContext; | 16 class BrowserContext; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace ui { | 19 namespace ui { |
| 20 class WebDialogDelegate; | 20 class WebDialogDelegate; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace ash { |
| 24 |
| 23 // A customized dialog view for the keyboard overlay. | 25 // A customized dialog view for the keyboard overlay. |
| 24 class ASH_EXPORT KeyboardOverlayView | 26 class ASH_EXPORT KeyboardOverlayView |
| 25 : public views::WebDialogView, | 27 : public views::WebDialogView, |
| 26 public ash::internal::OverlayEventFilter::Delegate { | 28 public ash::internal::OverlayEventFilter::Delegate { |
| 27 public: | 29 public: |
| 28 KeyboardOverlayView(content::BrowserContext* context, | 30 KeyboardOverlayView(content::BrowserContext* context, |
| 29 ui::WebDialogDelegate* delegate, | 31 ui::WebDialogDelegate* delegate, |
| 30 WebContentsHandler* handler); | 32 WebContentsHandler* handler); |
| 31 virtual ~KeyboardOverlayView(); | 33 virtual ~KeyboardOverlayView(); |
| 32 | 34 |
| 33 // Overridden from ash::internal::OverlayEventFilter::Delegate: | 35 // Overridden from ash::internal::OverlayEventFilter::Delegate: |
| 34 virtual void Cancel() OVERRIDE; | 36 virtual void Cancel() OVERRIDE; |
| 35 virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) OVERRIDE; | 37 virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) OVERRIDE; |
| 36 virtual aura::Window* GetWindow() OVERRIDE; | 38 virtual aura::Window* GetWindow() OVERRIDE; |
| 37 | 39 |
| 38 // Shows the keyboard overlay. | 40 // Shows the keyboard overlay. |
| 39 static void ShowDialog(content::BrowserContext* context, | 41 static void ShowDialog(content::BrowserContext* context, |
| 40 WebContentsHandler* handler, | 42 WebContentsHandler* handler, |
| 41 const GURL& url); | 43 const GURL& url); |
| 42 | 44 |
| 43 private: | 45 private: |
| 44 // Overridden from views::WidgetDelegate: | 46 // Overridden from views::WidgetDelegate: |
| 45 virtual void WindowClosing() OVERRIDE; | 47 virtual void WindowClosing() OVERRIDE; |
| 46 | 48 |
| 47 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayView); | 49 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayView); |
| 48 }; | 50 }; |
| 49 | 51 |
| 52 } // namespace ash |
| 53 |
| 50 #endif // ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_ | 54 #endif // ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_ |
| OLD | NEW |