OLD | NEW |
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_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DELEGATE_H_ |
7 | 7 |
8 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 8 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
9 | 9 |
10 | 10 |
11 class HtmlDialogView; | 11 class HtmlDialogView; |
12 | 12 |
13 class KeyboardOverlayDelegate : public HtmlDialogUIDelegate { | 13 class KeyboardOverlayDelegate : public HtmlDialogUIDelegate { |
14 public: | 14 public: |
15 explicit KeyboardOverlayDelegate(const std::wstring& title); | 15 explicit KeyboardOverlayDelegate(const std::wstring& title); |
16 | 16 |
17 void set_view(HtmlDialogView* html_view) { | 17 void set_view(HtmlDialogView* html_view) { |
18 view_ = html_view; | 18 view_ = html_view; |
19 } | 19 } |
20 | 20 |
21 HtmlDialogView* view() { | 21 HtmlDialogView* view() { |
22 return view_; | 22 return view_; |
23 } | 23 } |
24 | 24 |
25 private: | 25 private: |
26 virtual ~KeyboardOverlayDelegate(); | 26 virtual ~KeyboardOverlayDelegate(); |
27 | 27 |
28 // Overridden from HtmlDialogUI::Delegate: | 28 // Overridden from HtmlDialogUI::Delegate: |
29 virtual bool IsDialogModal() const; | 29 virtual bool IsDialogModal() const OVERRIDE; |
30 virtual std::wstring GetDialogTitle() const; | 30 virtual string16 GetDialogTitle() const OVERRIDE; |
31 virtual GURL GetDialogContentURL() const; | 31 virtual GURL GetDialogContentURL() const OVERRIDE; |
32 virtual void GetWebUIMessageHandlers( | 32 virtual void GetWebUIMessageHandlers( |
33 std::vector<WebUIMessageHandler*>* handlers) const; | 33 std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE; |
34 virtual void GetDialogSize(gfx::Size* size) const; | 34 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; |
35 virtual std::string GetDialogArgs() const; | 35 virtual std::string GetDialogArgs() const OVERRIDE; |
36 virtual void OnDialogClosed(const std::string& json_retval); | 36 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; |
37 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog); | 37 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) |
38 virtual bool ShouldShowDialogTitle() const; | 38 OVERRIDE; |
39 virtual bool HandleContextMenu(const ContextMenuParams& params); | 39 virtual bool ShouldShowDialogTitle() const OVERRIDE; |
| 40 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE; |
40 | 41 |
41 // The dialog title. | 42 // The dialog title. |
42 std::wstring title_; | 43 string16 title_; |
43 | 44 |
44 // The view associated with this delegate. | 45 // The view associated with this delegate. |
45 // This class does not own the pointer. | 46 // This class does not own the pointer. |
46 HtmlDialogView* view_; | 47 HtmlDialogView* view_; |
47 | 48 |
48 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayDelegate); | 49 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayDelegate); |
49 }; | 50 }; |
50 | 51 |
51 #endif // CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DELEGATE_H_ | 52 #endif // CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DELEGATE_H_ |
OLD | NEW |