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