| Index: chrome/browser/ui/views/keyboard_overlay_delegate.h
|
| diff --git a/chrome/browser/ui/views/keyboard_overlay_delegate.h b/chrome/browser/ui/views/keyboard_overlay_delegate.h
|
| index 2a75070e98777a3b804d43f52e1b9aae1d780f0c..cb37801f0d6f59ded853e7ecff69a80c70a180a8 100644
|
| --- a/chrome/browser/ui/views/keyboard_overlay_delegate.h
|
| +++ b/chrome/browser/ui/views/keyboard_overlay_delegate.h
|
| @@ -8,15 +8,19 @@
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| #include "chrome/browser/ui/webui/web_dialog_delegate.h"
|
| +#include "content/public/browser/notification_observer.h"
|
| +#include "content/public/browser/notification_registrar.h"
|
|
|
| +class KeyboardOverlayDialogView;
|
| class WebDialogView;
|
|
|
| -class KeyboardOverlayDelegate : public WebDialogDelegate {
|
| +class KeyboardOverlayDelegate : public WebDialogDelegate,
|
| + public content::NotificationObserver {
|
| public:
|
| explicit KeyboardOverlayDelegate(const string16& title);
|
|
|
| - WebDialogView* view() { return view_; }
|
| - void set_view(WebDialogView* view) { view_ = view; }
|
| + // Shows the keyboard overlay.
|
| + void Show(KeyboardOverlayDialogView* view);
|
|
|
| // Overridden from WebDialogDelegate:
|
| virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
|
| @@ -31,6 +35,9 @@ class KeyboardOverlayDelegate : public WebDialogDelegate {
|
| virtual void GetWebUIMessageHandlers(
|
| std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
|
| virtual std::string GetDialogArgs() const OVERRIDE;
|
| + virtual void OnDialogShown(
|
| + content::WebUI* webui,
|
| + content::RenderViewHost* render_view_host) OVERRIDE;
|
| virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
|
| virtual void OnCloseContents(content::WebContents* source,
|
| bool* out_close_dialog) OVERRIDE;
|
| @@ -38,6 +45,11 @@ class KeyboardOverlayDelegate : public WebDialogDelegate {
|
| virtual bool HandleContextMenu(
|
| const content::ContextMenuParams& params) OVERRIDE;
|
|
|
| + // Overridden from content::NotificationObserver:
|
| + virtual void Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) OVERRIDE;
|
| +
|
| // The dialog title.
|
| string16 title_;
|
|
|
| @@ -45,6 +57,11 @@ class KeyboardOverlayDelegate : public WebDialogDelegate {
|
| // This class does not own the pointer.
|
| WebDialogView* view_;
|
|
|
| + // Whether the associated web contents has been loaded.
|
| + bool loaded_;
|
| +
|
| + content::NotificationRegistrar registrar_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayDelegate);
|
| };
|
|
|
|
|