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..88bb016c059ec89dc672a002402e02437fee3f87 100644 |
--- a/chrome/browser/chromeos/set_time_dialog.h |
+++ b/chrome/browser/chromeos/net/network_portal_web_dialog.h |
@@ -2,28 +2,26 @@ |
// 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 "chrome/browser/chromeos/net/network_portal_notification_controller.h" |
+#include "ui/views/widget/widget.h" |
ygorshenin1
2014/11/24 15:02:09
Could you please add a forward declaration of ui::
Alexander Alekseev
2014/11/26 00:26:28
Done.
|
#include "ui/web_dialogs/web_dialog_delegate.h" |
namespace chromeos { |
-// Set Time dialog for setting the system time, date and time zone. |
-class SetTimeDialog : public ui::WebDialogDelegate { |
+class NetworkPortalWebDialog : public ui::WebDialogDelegate { |
public: |
- SetTimeDialog(); |
- virtual ~SetTimeDialog(); |
+ explicit NetworkPortalWebDialog( |
+ NetworkPortalNotificationController* controller); |
ygorshenin1
2014/11/24 15:02:09
I thought it would be better if ctor will take a w
Alexander Alekseev
2014/11/26 00:26:28
Done.
|
+ virtual ~NetworkPortalWebDialog(); |
- static void ShowDialog(gfx::NativeWindow owning_window); |
+ void SetWidget(views::Widget* widget); |
+ void Close(); |
private: |
- // ui::WebDialogDelegate: |
ygorshenin1
2014/11/24 15:02:09
nit: could you please restore the comment?
Alexander Alekseev
2014/11/26 00:28:04
Done.
|
virtual ui::ModalType GetDialogModalType() const override; |
virtual base::string16 GetDialogTitle() const override; |
virtual GURL GetDialogContentURL() const override; |
@@ -31,16 +29,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_; |
ygorshenin1
2014/11/24 15:02:09
#include "base/memory/weak_ptr.h"
Alexander Alekseev
2014/11/26 00:26:29
Done.
|
+ |
+ 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_ |