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

Side by Side Diff: chrome/browser/ui/views/keyboard_overlay_dialog_view.h

Issue 10214001: WebDialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DIALOG_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DIALOG_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DIALOG_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h" 12 #include "chrome/browser/ui/webui/web_dialog_web_contents_delegate.h"
13 #include "chrome/browser/ui/webui/html_dialog_ui.h" 13 #include "chrome/browser/ui/webui/web_dialog_ui.h"
14 #include "chrome/browser/ui/views/html_dialog_view.h" 14 #include "chrome/browser/ui/views/web_dialog_view.h"
15 15
16 namespace ui { 16 namespace ui {
17 class Accelerator; 17 class Accelerator;
18 } 18 }
19 19
20 class BrowserView; 20 class BrowserView;
21 21
22 // A customized dialog view for the keyboard overlay. 22 // A customized dialog view for the keyboard overlay.
23 class KeyboardOverlayDialogView : public HtmlDialogView { 23 class KeyboardOverlayDialogView : public WebDialogView {
24 public: 24 public:
25 KeyboardOverlayDialogView(Profile* profile, 25 KeyboardOverlayDialogView(Profile* profile,
26 HtmlDialogUIDelegate* delegate, 26 WebDialogDelegate* delegate,
27 BrowserView* parent_view); 27 BrowserView* parent_view);
28 virtual ~KeyboardOverlayDialogView(); 28 virtual ~KeyboardOverlayDialogView();
29 29
30 // Overridden from views::View: 30 // Overridden from views::View:
31 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 31 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
32 32
33 // Shows the keyboard overlay. 33 // Shows the keyboard overlay.
34 static void ShowDialog(gfx::NativeWindow owning_window, BrowserView* parent); 34 static void ShowDialog(gfx::NativeWindow owning_window, BrowserView* parent);
35 35
36 private: 36 private:
37 void RegisterDialogAccelerators(); 37 void RegisterDialogAccelerators();
38 38
39 // Returns true if |accelerator| is an accelerator for closing the dialog. 39 // Returns true if |accelerator| is an accelerator for closing the dialog.
40 bool IsCloseAccelerator(const ui::Accelerator& accelerator); 40 bool IsCloseAccelerator(const ui::Accelerator& accelerator);
41 41
42 // Points to the view from which this dialog is created. 42 // Points to the view from which this dialog is created.
43 BrowserView* parent_view_; 43 BrowserView* parent_view_;
44 44
45 // Contains accelerators for closing this dialog. 45 // Contains accelerators for closing this dialog.
46 std::set<ui::Accelerator> close_accelerators_; 46 std::set<ui::Accelerator> close_accelerators_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayDialogView); 48 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayDialogView);
49 }; 49 };
50 50
51 #endif // CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DIALOG_VIEW_H_ 51 #endif // CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DIALOG_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/keyboard_overlay_delegate.cc ('k') | chrome/browser/ui/views/keyboard_overlay_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698