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

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

Issue 105193002: Replace string16 with base::string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | 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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 22 matching lines...) Expand all
33 virtual ~Delegate() {} 33 virtual ~Delegate() {}
34 }; 34 };
35 35
36 enum Style { 36 enum Style {
37 STYLE_GENERIC, // Use generic CreateChromeWindow as a host. 37 STYLE_GENERIC, // Use generic CreateChromeWindow as a host.
38 STYLE_BUBBLE // Use chromeos::BubbleWindow as a host. 38 STYLE_BUBBLE // Use chromeos::BubbleWindow as a host.
39 }; 39 };
40 40
41 LoginWebDialog(Delegate* delegate, 41 LoginWebDialog(Delegate* delegate,
42 gfx::NativeWindow parent_window, 42 gfx::NativeWindow parent_window,
43 const string16& title, 43 const base::string16& title,
44 const GURL& url, 44 const GURL& url,
45 Style style); 45 Style style);
46 virtual ~LoginWebDialog(); 46 virtual ~LoginWebDialog();
47 47
48 void Show(); 48 void Show();
49 49
50 // Overrides default width/height for dialog. 50 // Overrides default width/height for dialog.
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 base::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 // ui::WebDialogDelegate implementation. 61 // ui::WebDialogDelegate implementation.
62 virtual ui::ModalType GetDialogModalType() const OVERRIDE; 62 virtual ui::ModalType GetDialogModalType() const OVERRIDE;
63 virtual string16 GetDialogTitle() const OVERRIDE; 63 virtual base::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 void GetMinimumDialogSize(gfx::Size* size) const OVERRIDE; 68 virtual void GetMinimumDialogSize(gfx::Size* size) const OVERRIDE;
69 virtual std::string GetDialogArgs() const OVERRIDE; 69 virtual std::string GetDialogArgs() const OVERRIDE;
70 // NOTE: This function deletes this object at the end. 70 // NOTE: This function deletes this object at the end.
71 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; 71 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
72 virtual void OnCloseContents( 72 virtual void OnCloseContents(
73 content::WebContents* source, bool* out_close_dialog) OVERRIDE; 73 content::WebContents* source, bool* out_close_dialog) OVERRIDE;
74 virtual bool ShouldShowDialogTitle() const OVERRIDE; 74 virtual bool ShouldShowDialogTitle() const OVERRIDE;
75 virtual bool HandleContextMenu( 75 virtual bool HandleContextMenu(
76 const content::ContextMenuParams& params) OVERRIDE; 76 const content::ContextMenuParams& params) OVERRIDE;
77 77
78 // content::NotificationObserver implementation. 78 // content::NotificationObserver implementation.
79 virtual void Observe(int type, 79 virtual void Observe(int type,
80 const content::NotificationSource& source, 80 const content::NotificationSource& source,
81 const content::NotificationDetails& details) OVERRIDE; 81 const content::NotificationDetails& details) OVERRIDE;
82 82
83 private: 83 private:
84 // Notifications receiver. 84 // Notifications receiver.
85 Delegate* delegate_; 85 Delegate* delegate_;
86 86
87 gfx::NativeWindow parent_window_; 87 gfx::NativeWindow parent_window_;
88 string16 title_; 88 base::string16 title_;
89 GURL url_; 89 GURL url_;
90 Style style_; 90 Style style_;
91 content::NotificationRegistrar notification_registrar_; 91 content::NotificationRegistrar notification_registrar_;
92 bool is_open_; 92 bool is_open_;
93 93
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/login/login_utils_browsertest.cc ('k') | chrome/browser/chromeos/login/login_web_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698