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