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

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

Issue 10214001: WebDialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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_HTML_DIALOG_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_HTML_DIALOG_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_HTML_DIALOG_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_HTML_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/html_dialog_ui.h" 12 #include "chrome/browser/ui/webui/web_dialog_ui.h"
13 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
15 #include "ui/gfx/native_widget_types.h" 15 #include "ui/gfx/native_widget_types.h"
16 #include "ui/gfx/size.h" 16 #include "ui/gfx/size.h"
17 17
18 namespace chromeos { 18 namespace chromeos {
19 19
20 class BubbleFrameView; 20 class BubbleFrameView;
21 21
22 // Launches html dialog during OOBE/Login with specified URL and title. 22 // Launches web dialog during OOBE/Login with specified URL and title.
23 class LoginHtmlDialog : public HtmlDialogUIDelegate, 23 class LoginHtmlDialog : public WebDialogDelegate,
24 public content::NotificationObserver { 24 public content::NotificationObserver {
25 public: 25 public:
26 // Delegate class to get notifications from the dialog. 26 // Delegate class to get notifications from the dialog.
27 class Delegate { 27 class Delegate {
28 public: 28 public:
29 virtual ~Delegate() {} 29 virtual ~Delegate() {}
30 30
31 // Called when dialog has been closed. 31 // Called when dialog has been closed.
32 virtual void OnDialogClosed(); 32 virtual void OnDialogClosed();
33 }; 33 };
(...skipping 17 matching lines...) Expand all
51 void SetDialogSize(int width, int height); 51 void SetDialogSize(int width, int height);
52 52
53 // Overrides dialog title. 53 // Overrides dialog title.
54 void SetDialogTitle(const string16& title); 54 void SetDialogTitle(const string16& title);
55 55
56 void set_url(const GURL& url) { url_ = url; } 56 void set_url(const GURL& url) { url_ = url; }
57 57
58 bool is_open() const { return is_open_; } 58 bool is_open() const { return is_open_; }
59 59
60 protected: 60 protected:
61 // HtmlDialogUIDelegate implementation. 61 // WebDialogDelegate implementation.
62 virtual ui::ModalType GetDialogModalType() const OVERRIDE; 62 virtual ui::ModalType GetDialogModalType() const OVERRIDE;
63 virtual string16 GetDialogTitle() const OVERRIDE; 63 virtual string16 GetDialogTitle() const OVERRIDE;
64 virtual GURL GetDialogContentURL() const OVERRIDE; 64 virtual GURL GetDialogContentURL() const OVERRIDE;
65 virtual void GetWebUIMessageHandlers( 65 virtual void GetWebUIMessageHandlers(
66 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; 66 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
67 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; 67 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
68 virtual std::string GetDialogArgs() const OVERRIDE; 68 virtual std::string GetDialogArgs() const OVERRIDE;
69 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; 69 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
70 virtual void OnCloseContents( 70 virtual void OnCloseContents(
71 content::WebContents* source, bool* out_close_dialog) OVERRIDE; 71 content::WebContents* source, bool* out_close_dialog) OVERRIDE;
(...skipping 21 matching lines...) Expand all
93 // Dialog display size. 93 // Dialog display size.
94 int width_; 94 int width_;
95 int height_; 95 int height_;
96 96
97 DISALLOW_COPY_AND_ASSIGN(LoginHtmlDialog); 97 DISALLOW_COPY_AND_ASSIGN(LoginHtmlDialog);
98 }; 98 };
99 99
100 } // namespace chromeos 100 } // namespace chromeos
101 101
102 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_HTML_DIALOG_H_ 102 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_HTML_DIALOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/choose_mobile_network_dialog.cc ('k') | chrome/browser/chromeos/login/login_html_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698