| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROMEOS_LOGIN_UI_LOGIN_WEB_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_WEB_DIALOG_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_WEB_DIALOG_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_WEB_DIALOG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 void SetDialogTitle(const base::string16& title); | 58 void SetDialogTitle(const base::string16& title); |
| 59 | 59 |
| 60 void set_url(const GURL& url) { url_ = url; } | 60 void set_url(const GURL& url) { url_ = url; } |
| 61 | 61 |
| 62 bool is_open() const { return is_open_; } | 62 bool is_open() const { return is_open_; } |
| 63 | 63 |
| 64 static content::WebContents* GetCurrentWebContents(); | 64 static content::WebContents* GetCurrentWebContents(); |
| 65 | 65 |
| 66 protected: | 66 protected: |
| 67 // ui::WebDialogDelegate implementation. | 67 // ui::WebDialogDelegate implementation. |
| 68 virtual ui::ModalType GetDialogModalType() const OVERRIDE; | 68 virtual ui::ModalType GetDialogModalType() const override; |
| 69 virtual base::string16 GetDialogTitle() const OVERRIDE; | 69 virtual base::string16 GetDialogTitle() const override; |
| 70 virtual GURL GetDialogContentURL() const OVERRIDE; | 70 virtual GURL GetDialogContentURL() const override; |
| 71 virtual void GetWebUIMessageHandlers( | 71 virtual void GetWebUIMessageHandlers( |
| 72 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; | 72 std::vector<content::WebUIMessageHandler*>* handlers) const override; |
| 73 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; | 73 virtual void GetDialogSize(gfx::Size* size) const override; |
| 74 virtual void GetMinimumDialogSize(gfx::Size* size) const OVERRIDE; | 74 virtual void GetMinimumDialogSize(gfx::Size* size) const override; |
| 75 virtual std::string GetDialogArgs() const OVERRIDE; | 75 virtual std::string GetDialogArgs() const override; |
| 76 virtual void OnDialogShown( | 76 virtual void OnDialogShown( |
| 77 content::WebUI* webui, | 77 content::WebUI* webui, |
| 78 content::RenderViewHost* render_view_host) OVERRIDE; | 78 content::RenderViewHost* render_view_host) override; |
| 79 // NOTE: This function deletes this object at the end. | 79 // NOTE: This function deletes this object at the end. |
| 80 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; | 80 virtual void OnDialogClosed(const std::string& json_retval) override; |
| 81 virtual void OnCloseContents( | 81 virtual void OnCloseContents( |
| 82 content::WebContents* source, bool* out_close_dialog) OVERRIDE; | 82 content::WebContents* source, bool* out_close_dialog) override; |
| 83 virtual bool ShouldShowDialogTitle() const OVERRIDE; | 83 virtual bool ShouldShowDialogTitle() const override; |
| 84 virtual bool HandleContextMenu( | 84 virtual bool HandleContextMenu( |
| 85 const content::ContextMenuParams& params) OVERRIDE; | 85 const content::ContextMenuParams& params) override; |
| 86 | 86 |
| 87 // content::NotificationObserver implementation. | 87 // content::NotificationObserver implementation. |
| 88 virtual void Observe(int type, | 88 virtual void Observe(int type, |
| 89 const content::NotificationSource& source, | 89 const content::NotificationSource& source, |
| 90 const content::NotificationDetails& details) OVERRIDE; | 90 const content::NotificationDetails& details) override; |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 content::BrowserContext* browser_context_; | 93 content::BrowserContext* browser_context_; |
| 94 gfx::NativeWindow parent_window_; | 94 gfx::NativeWindow parent_window_; |
| 95 // Notifications receiver. | 95 // Notifications receiver. |
| 96 Delegate* delegate_; | 96 Delegate* delegate_; |
| 97 | 97 |
| 98 base::string16 title_; | 98 base::string16 title_; |
| 99 GURL url_; | 99 GURL url_; |
| 100 content::NotificationRegistrar notification_registrar_; | 100 content::NotificationRegistrar notification_registrar_; |
| 101 bool is_open_; | 101 bool is_open_; |
| 102 | 102 |
| 103 // Dialog display size. | 103 // Dialog display size. |
| 104 int width_; | 104 int width_; |
| 105 int height_; | 105 int height_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(LoginWebDialog); | 107 DISALLOW_COPY_AND_ASSIGN(LoginWebDialog); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace chromeos | 110 } // namespace chromeos |
| 111 | 111 |
| 112 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_WEB_DIALOG_H_ | 112 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_WEB_DIALOG_H_ |
| OLD | NEW |