Chromium Code Reviews| 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_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 | 9 #include "chrome/browser/chromeos/net/network_portal_notification_controller.h" |
| 10 #include "base/compiler_specific.h" | 10 #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.
| |
| 11 #include "base/values.h" | |
| 12 #include "ui/gfx/native_widget_types.h" | |
| 13 #include "ui/web_dialogs/web_dialog_delegate.h" | 11 #include "ui/web_dialogs/web_dialog_delegate.h" |
| 14 | 12 |
| 15 namespace chromeos { | 13 namespace chromeos { |
| 16 | 14 |
| 17 // Set Time dialog for setting the system time, date and time zone. | 15 class NetworkPortalWebDialog : public ui::WebDialogDelegate { |
| 18 class SetTimeDialog : public ui::WebDialogDelegate { | |
| 19 public: | 16 public: |
| 20 SetTimeDialog(); | 17 explicit NetworkPortalWebDialog( |
| 21 virtual ~SetTimeDialog(); | 18 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.
| |
| 19 virtual ~NetworkPortalWebDialog(); | |
| 22 | 20 |
| 23 static void ShowDialog(gfx::NativeWindow owning_window); | 21 void SetWidget(views::Widget* widget); |
| 22 void Close(); | |
| 24 | 23 |
| 25 private: | 24 private: |
| 26 // 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.
| |
| 27 virtual ui::ModalType GetDialogModalType() const override; | 25 virtual ui::ModalType GetDialogModalType() const override; |
| 28 virtual base::string16 GetDialogTitle() const override; | 26 virtual base::string16 GetDialogTitle() const override; |
| 29 virtual GURL GetDialogContentURL() const override; | 27 virtual GURL GetDialogContentURL() const override; |
| 30 virtual void GetWebUIMessageHandlers( | 28 virtual void GetWebUIMessageHandlers( |
| 31 std::vector<content::WebUIMessageHandler*>* handlers) const override; | 29 std::vector<content::WebUIMessageHandler*>* handlers) const override; |
| 32 virtual void GetDialogSize(gfx::Size* size) const override; | 30 virtual void GetDialogSize(gfx::Size* size) const override; |
| 33 virtual std::string GetDialogArgs() const override; | 31 virtual std::string GetDialogArgs() const override; |
| 32 virtual bool CanResizeDialog() const override; | |
| 34 virtual void OnDialogClosed(const std::string& json_retval) override; | 33 virtual void OnDialogClosed(const std::string& json_retval) override; |
| 35 virtual void OnCloseContents(content::WebContents* source, | 34 virtual void OnCloseContents(content::WebContents* source, |
| 36 bool* out_close_dialog) override; | 35 bool* out_close_dialog) override; |
| 37 virtual bool ShouldShowDialogTitle() const override; | 36 virtual bool ShouldShowDialogTitle() const override; |
| 38 virtual bool HandleContextMenu( | |
| 39 const content::ContextMenuParams& params) override; | |
| 40 | 37 |
| 41 DISALLOW_COPY_AND_ASSIGN(SetTimeDialog); | 38 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.
| |
| 39 | |
| 40 views::Widget* widget_; | |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(NetworkPortalWebDialog); | |
| 42 }; | 43 }; |
| 43 | 44 |
| 44 } // namespace chromeos | 45 } // namespace chromeos |
| 45 | 46 |
| 46 #endif // CHROME_BROWSER_CHROMEOS_SET_TIME_DIALOG_H_ | 47 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_WEB_DIALOG_H_ |
| OLD | NEW |