Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Unified Diff: chrome/browser/chromeos/net/network_portal_web_dialog.h

Issue 750153002: ChromeOS: bypass proxy for captive portal authorization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 50%
copy from chrome/browser/chromeos/set_time_dialog.h
copy to chrome/browser/chromeos/net/network_portal_web_dialog.h
index 71bee75fcb8658a92f07dbb8e54590b571adf958..1f7f20943c6c3e1d2a17743af813308004696a90 100644
--- a/chrome/browser/chromeos/set_time_dialog.h
+++ b/chrome/browser/chromeos/net/network_portal_web_dialog.h
@@ -2,25 +2,30 @@
// 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 {
+// This is the modal Web dialog to display captive portal login page.
+// It is automatically closed when successful authorization is detected.
+class NetworkPortalWebDialog : public ui::WebDialogDelegate {
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 +36,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_

Powered by Google App Engine
This is Rietveld 408576698