Chromium Code Reviews| Index: chrome/browser/chromeos/net/network_portal_web_dialog.h |
| diff --git a/chrome/browser/chromeos/set_time_dialog.h b/chrome/browser/chromeos/net/network_portal_web_dialog.h |
| similarity index 54% |
| copy from chrome/browser/chromeos/set_time_dialog.h |
| copy to chrome/browser/chromeos/net/network_portal_web_dialog.h |
| index 71bee75fcb8658a92f07dbb8e54590b571adf958..a673f17fcf9459e66e4ce81b1e37b6e9b94cd251 100644 |
| --- a/chrome/browser/chromeos/set_time_dialog.h |
| +++ b/chrome/browser/chromeos/net/network_portal_web_dialog.h |
| @@ -2,25 +2,28 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CHROME_BROWSER_CHROMEOS_SET_TIME_DIALOG_H_ |
| -#define CHROME_BROWSER_CHROMEOS_SET_TIME_DIALOG_H_ |
| +#ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_WEB_DIALOG_H_ |
| +#define CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_WEB_DIALOG_H_ |
| -#include <string> |
| - |
| -#include "base/compiler_specific.h" |
| -#include "base/values.h" |
| -#include "ui/gfx/native_widget_types.h" |
| +#include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "chrome/browser/chromeos/net/network_portal_notification_controller.h" |
| #include "ui/web_dialogs/web_dialog_delegate.h" |
| +namespace views { |
| +class Widget; |
| +} |
| + |
| namespace chromeos { |
| -// Set Time dialog for setting the system time, date and time zone. |
| -class SetTimeDialog : public ui::WebDialogDelegate { |
| +class NetworkPortalWebDialog : public ui::WebDialogDelegate { |
|
Nikita (slow)
2014/11/26 18:02:57
nit: Add class comment i.e. what it is, where it i
Alexander Alekseev
2014/11/26 19:42:42
Done.
|
| public: |
| - SetTimeDialog(); |
| - virtual ~SetTimeDialog(); |
| + explicit NetworkPortalWebDialog( |
| + base::WeakPtr<NetworkPortalNotificationController> controller); |
| + virtual ~NetworkPortalWebDialog(); |
| - static void ShowDialog(gfx::NativeWindow owning_window); |
| + void SetWidget(views::Widget* widget); |
| + void Close(); |
| private: |
| // ui::WebDialogDelegate: |
| @@ -31,16 +34,19 @@ class SetTimeDialog : public ui::WebDialogDelegate { |
| std::vector<content::WebUIMessageHandler*>* handlers) const override; |
| virtual void GetDialogSize(gfx::Size* size) const override; |
| virtual std::string GetDialogArgs() const override; |
| + virtual bool CanResizeDialog() const override; |
| virtual void OnDialogClosed(const std::string& json_retval) override; |
| virtual void OnCloseContents(content::WebContents* source, |
| bool* out_close_dialog) override; |
| virtual bool ShouldShowDialogTitle() const override; |
| - virtual bool HandleContextMenu( |
| - const content::ContextMenuParams& params) override; |
| - DISALLOW_COPY_AND_ASSIGN(SetTimeDialog); |
| + base::WeakPtr<NetworkPortalNotificationController> controller_; |
| + |
| + views::Widget* widget_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(NetworkPortalWebDialog); |
| }; |
| } // namespace chromeos |
| -#endif // CHROME_BROWSER_CHROMEOS_SET_TIME_DIALOG_H_ |
| +#endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_WEB_DIALOG_H_ |