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

Side by Side 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: Update after review. Created 6 years 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 unified diff | Download patch
OLDNEW
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_SET_TIME_DIALOG_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_WEB_DIALOG_H_
6 #define CHROME_BROWSER_CHROMEOS_SET_TIME_DIALOG_H_ 6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_WEB_DIALOG_H_
7 7
8 #include <string> 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/chromeos/net/network_portal_notification_controller.h"
11 #include "ui/web_dialogs/web_dialog_delegate.h"
9 12
10 #include "base/compiler_specific.h" 13 namespace views {
11 #include "base/values.h" 14 class Widget;
12 #include "ui/gfx/native_widget_types.h" 15 }
13 #include "ui/web_dialogs/web_dialog_delegate.h"
14 16
15 namespace chromeos { 17 namespace chromeos {
16 18
17 // Set Time dialog for setting the system time, date and time zone. 19 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.
18 class SetTimeDialog : public ui::WebDialogDelegate {
19 public: 20 public:
20 SetTimeDialog(); 21 explicit NetworkPortalWebDialog(
21 virtual ~SetTimeDialog(); 22 base::WeakPtr<NetworkPortalNotificationController> controller);
23 virtual ~NetworkPortalWebDialog();
22 24
23 static void ShowDialog(gfx::NativeWindow owning_window); 25 void SetWidget(views::Widget* widget);
26 void Close();
24 27
25 private: 28 private:
26 // ui::WebDialogDelegate: 29 // ui::WebDialogDelegate:
27 virtual ui::ModalType GetDialogModalType() const override; 30 virtual ui::ModalType GetDialogModalType() const override;
28 virtual base::string16 GetDialogTitle() const override; 31 virtual base::string16 GetDialogTitle() const override;
29 virtual GURL GetDialogContentURL() const override; 32 virtual GURL GetDialogContentURL() const override;
30 virtual void GetWebUIMessageHandlers( 33 virtual void GetWebUIMessageHandlers(
31 std::vector<content::WebUIMessageHandler*>* handlers) const override; 34 std::vector<content::WebUIMessageHandler*>* handlers) const override;
32 virtual void GetDialogSize(gfx::Size* size) const override; 35 virtual void GetDialogSize(gfx::Size* size) const override;
33 virtual std::string GetDialogArgs() const override; 36 virtual std::string GetDialogArgs() const override;
37 virtual bool CanResizeDialog() const override;
34 virtual void OnDialogClosed(const std::string& json_retval) override; 38 virtual void OnDialogClosed(const std::string& json_retval) override;
35 virtual void OnCloseContents(content::WebContents* source, 39 virtual void OnCloseContents(content::WebContents* source,
36 bool* out_close_dialog) override; 40 bool* out_close_dialog) override;
37 virtual bool ShouldShowDialogTitle() const override; 41 virtual bool ShouldShowDialogTitle() const override;
38 virtual bool HandleContextMenu(
39 const content::ContextMenuParams& params) override;
40 42
41 DISALLOW_COPY_AND_ASSIGN(SetTimeDialog); 43 base::WeakPtr<NetworkPortalNotificationController> controller_;
44
45 views::Widget* widget_;
46
47 DISALLOW_COPY_AND_ASSIGN(NetworkPortalWebDialog);
42 }; 48 };
43 49
44 } // namespace chromeos 50 } // namespace chromeos
45 51
46 #endif // CHROME_BROWSER_CHROMEOS_SET_TIME_DIALOG_H_ 52 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_WEB_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698