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

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

Issue 2675007: Add OOBE/login html dialog. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: merge Created 10 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chromeos/login/login_html_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_HTML_DIALOG_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_HTML_DIALOG_H_
7
8 #include <string>
9
10 #include "chrome/browser/dom_ui/html_dialog_ui.h"
11 #include "gfx/native_widget_types.h"
12 #include "gfx/size.h"
13
14 namespace chromeos {
15
16 // Launches html dialog during OOBE/Login with specified URL and title.
17 class LoginHtmlDialog : public HtmlDialogUIDelegate {
18 public:
19 // Delegate class to get notifications from the dialog.
20 class Delegate {
21 public:
22 virtual ~Delegate() {}
23
24 // Called when dialog has been closed.
25 virtual void OnDialogClosed() = 0;
26 };
27
28 LoginHtmlDialog(Delegate* delegate,
29 gfx::NativeWindow parent_window,
30 const std::wstring& title,
31 const GURL& url);
32 ~LoginHtmlDialog();
33
34 // Shows created dialog.
35 void Show();
36
37 protected:
38 // HtmlDialogUIDelegate implementation.
39 virtual bool IsDialogModal() const { return true; }
40 virtual std::wstring GetDialogTitle() const { return title_; }
41 virtual GURL GetDialogContentURL() const { return url_; }
42 virtual void GetDOMMessageHandlers(
43 std::vector<DOMMessageHandler*>* handlers) const {}
44 virtual void GetDialogSize(gfx::Size* size) const;
45 virtual std::string GetDialogArgs() const { return std::string(); }
46 virtual void OnDialogClosed(const std::string& json_retval);
47 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog);
48
49 private:
50 // Notifications receiver.
51 Delegate* delegate_;
52
53 gfx::NativeWindow parent_window_;
54 std::wstring title_;
55 GURL url_;
56
57 DISALLOW_COPY_AND_ASSIGN(LoginHtmlDialog);
58 };
59
60 } // namespace chromeos
61
62 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_HTML_DIALOG_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chromeos/login/login_html_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698