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

Side by Side Diff: chrome/browser/chromeos/login/login_web_dialog.h

Issue 10448066: Move the web dialogs code to src/ui/web_dialogs from src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_LOGIN_LOGIN_WEB_DIALOG_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_WEB_DIALOG_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_WEB_DIALOG_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_WEB_DIALOG_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/ui/webui/web_dialog_delegate.h"
13 #include "content/public/browser/notification_observer.h" 12 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 13 #include "content/public/browser/notification_registrar.h"
15 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
16 #include "ui/gfx/native_widget_types.h" 15 #include "ui/gfx/native_widget_types.h"
17 #include "ui/gfx/size.h" 16 #include "ui/gfx/size.h"
17 #include "ui/web_dialogs/web_dialog_delegate.h"
18 18
19 namespace chromeos { 19 namespace chromeos {
20 20
21 class BubbleFrameView; 21 class BubbleFrameView;
22 22
23 // Launches web dialog during OOBE/Login with specified URL and title. 23 // Launches web dialog during OOBE/Login with specified URL and title.
24 class LoginWebDialog : public WebDialogDelegate, 24 class LoginWebDialog : public ui::WebDialogDelegate,
25 public content::NotificationObserver { 25 public content::NotificationObserver {
26 public: 26 public:
27 // Delegate class to get notifications from the dialog. 27 // Delegate class to get notifications from the dialog.
28 class Delegate { 28 class Delegate {
29 public: 29 public:
30 // Called when dialog has been closed. 30 // Called when dialog has been closed.
31 virtual void OnDialogClosed(); 31 virtual void OnDialogClosed();
32 32
33 protected: 33 protected:
34 virtual ~Delegate() {} 34 virtual ~Delegate() {}
(...skipping 17 matching lines...) Expand all
52 void SetDialogSize(int width, int height); 52 void SetDialogSize(int width, int height);
53 53
54 // Overrides dialog title. 54 // Overrides dialog title.
55 void SetDialogTitle(const string16& title); 55 void SetDialogTitle(const string16& title);
56 56
57 void set_url(const GURL& url) { url_ = url; } 57 void set_url(const GURL& url) { url_ = url; }
58 58
59 bool is_open() const { return is_open_; } 59 bool is_open() const { return is_open_; }
60 60
61 protected: 61 protected:
62 // WebDialogDelegate implementation. 62 // ui::WebDialogDelegate implementation.
63 virtual ui::ModalType GetDialogModalType() const OVERRIDE; 63 virtual ui::ModalType GetDialogModalType() const OVERRIDE;
64 virtual string16 GetDialogTitle() const OVERRIDE; 64 virtual string16 GetDialogTitle() const OVERRIDE;
65 virtual GURL GetDialogContentURL() const OVERRIDE; 65 virtual GURL GetDialogContentURL() const OVERRIDE;
66 virtual void GetWebUIMessageHandlers( 66 virtual void GetWebUIMessageHandlers(
67 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; 67 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
68 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; 68 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
69 virtual std::string GetDialogArgs() const OVERRIDE; 69 virtual std::string GetDialogArgs() const OVERRIDE;
70 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; 70 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
71 virtual void OnCloseContents( 71 virtual void OnCloseContents(
72 content::WebContents* source, bool* out_close_dialog) OVERRIDE; 72 content::WebContents* source, bool* out_close_dialog) OVERRIDE;
(...skipping 21 matching lines...) Expand all
94 // Dialog display size. 94 // Dialog display size.
95 int width_; 95 int width_;
96 int height_; 96 int height_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(LoginWebDialog); 98 DISALLOW_COPY_AND_ASSIGN(LoginWebDialog);
99 }; 99 };
100 100
101 } // namespace chromeos 101 } // namespace chromeos
102 102
103 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_WEB_DIALOG_H_ 103 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_WEB_DIALOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/choose_mobile_network_dialog.h ('k') | chrome/browser/chromeos/login/proxy_settings_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698