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

Side by Side Diff: chrome/browser/chromeos/password_dialog_view.h

Issue 231014: Add wifi menu button in status bar. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 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_PASSWORD_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_PASSWORD_DIALOG_VIEW_H_
7
8 #include "base/string16.h"
9 #include "views/window/dialog_delegate.h"
10
11 namespace views {
12 class Textfield;
13 class View;
14 class Window;
15 }
16
17 // Delegate implemented by caller of PasswordDialogView to handle the user
18 // interacting with the dialog box.
19 class PasswordDialogDelegate {
20 public:
21 // Called when user clicks on cancel button.
22 // Return whether or not to allow password dialog to close.
23 virtual bool OnPasswordDialogCancel() = 0;
24
25 // Called when user clicks on ok with a password.
26 // Return whether or not to allow password dialog to close.
27 virtual bool OnPasswordDialogAccept(const string16& password) = 0;
28 };
29
30 // A dialog box for showing a password textfield.
31 class PasswordDialogView : public views::View,
32 public views::DialogDelegate {
33 public:
34 explicit PasswordDialogView(PasswordDialogDelegate* delegate);
35 virtual ~PasswordDialogView() {}
36
37 // views::DialogDelegate methods.
38 virtual bool Cancel();
39 virtual bool Accept();
40 virtual std::wstring GetWindowTitle() const;
41
42 // views::WindowDelegate method.
43 virtual bool IsModal() const { return true; }
44 virtual views::View* GetContentsView() { return this; }
45
46 // views::View overrides.
47 virtual void Layout();
48 virtual gfx::Size GetPreferredSize();
49
50 protected:
51 virtual void ViewHierarchyChanged(bool is_add, views::View* parent,
52 views::View* child);
53
54 private:
55 void Init();
56
57 // Used for call back to delegate that password has been entered.
58 PasswordDialogDelegate* delegate_;
59
60 // Combobox and its corresponding model.
61 views::Textfield* password_textfield_;
62
63 DISALLOW_COPY_AND_ASSIGN(PasswordDialogView);
64 };
65
66 #endif // CHROME_BROWSER_CHROMEOS_PASSWORD_DIALOG_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/network_menu_button.cc ('k') | chrome/browser/chromeos/password_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698