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

Side by Side Diff: chrome/browser/views/new_profile_dialog.h

Issue 115825: Move text_field.cc and rename the class to Textfield in preparation for porti... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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
« no previous file with comments | « chrome/browser/views/login_view.cc ('k') | chrome/browser/views/new_profile_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
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // A dialog box that prompts the user to enter a profile name, and opens a new 5 // A dialog box that prompts the user to enter a profile name, and opens a new
6 // window in that profile. 6 // window in that profile.
7 7
8 #ifndef CHROME_BROWSER_VIEWS_NEW_PROFILE_DIALOG_H_ 8 #ifndef CHROME_BROWSER_VIEWS_NEW_PROFILE_DIALOG_H_
9 #define CHROME_BROWSER_VIEWS_NEW_PROFILE_DIALOG_H_ 9 #define CHROME_BROWSER_VIEWS_NEW_PROFILE_DIALOG_H_
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "chrome/browser/shell_dialogs.h" 13 #include "chrome/browser/shell_dialogs.h"
14 #include "views/controls/text_field.h" 14 #include "views/controls/textfield/textfield.h"
15 #include "views/window/dialog_delegate.h" 15 #include "views/window/dialog_delegate.h"
16 16
17 class MessageBoxView; 17 class MessageBoxView;
18 namespace views { 18 namespace views {
19 class View; 19 class View;
20 class Window; 20 class Window;
21 } 21 }
22 22
23 // Dialog that prompts the user to create a new profile. 23 // Dialog that prompts the user to create a new profile.
24 class NewProfileDialog : public views::DialogDelegate, 24 class NewProfileDialog : public views::DialogDelegate,
25 public views::TextField::Controller { 25 public views::Textfield::Controller {
26 public: 26 public:
27 // Creates and runs the dialog. 27 // Creates and runs the dialog.
28 static void RunDialog(); 28 static void RunDialog();
29 virtual ~NewProfileDialog(); 29 virtual ~NewProfileDialog();
30 30
31 // views::DialogDelegate methods. 31 // views::DialogDelegate methods.
32 virtual bool Accept(); 32 virtual bool Accept();
33 virtual views::View* GetInitiallyFocusedView(); 33 virtual views::View* GetInitiallyFocusedView();
34 virtual bool IsDialogButtonEnabled( 34 virtual bool IsDialogButtonEnabled(
35 MessageBoxFlags::DialogButton button) const; 35 MessageBoxFlags::DialogButton button) const;
36 virtual std::wstring GetWindowTitle() const; 36 virtual std::wstring GetWindowTitle() const;
37 virtual void DeleteDelegate(); 37 virtual void DeleteDelegate();
38 38
39 // views::TextField::Controller methods. 39 // views::Textfield::Controller methods.
40 virtual void ContentsChanged(views::TextField* sender, 40 virtual void ContentsChanged(views::Textfield* sender,
41 const std::wstring& new_contents); 41 const std::wstring& new_contents);
42 virtual bool HandleKeystroke(views::TextField* sender, 42 virtual bool HandleKeystroke(views::Textfield* sender,
43 const views::TextField::Keystroke& key) { 43 const views::Textfield::Keystroke& key) {
44 return false; 44 return false;
45 } 45 }
46 46
47 // views::WindowDelegate methods. 47 // views::WindowDelegate methods.
48 virtual views::View* GetContentsView(); 48 virtual views::View* GetContentsView();
49 virtual bool IsAlwaysOnTop() const { return false; } 49 virtual bool IsAlwaysOnTop() const { return false; }
50 virtual bool IsModal() const { return false; } 50 virtual bool IsModal() const { return false; }
51 51
52 private: 52 private:
53 NewProfileDialog(); 53 NewProfileDialog();
54 54
55 MessageBoxView* message_box_view_; 55 MessageBoxView* message_box_view_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(NewProfileDialog); 57 DISALLOW_COPY_AND_ASSIGN(NewProfileDialog);
58 }; 58 };
59 59
60 #endif // CHROME_BROWSER_VIEWS_NEW_PROFILE_DIALOG_H_ 60 #endif // CHROME_BROWSER_VIEWS_NEW_PROFILE_DIALOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/login_view.cc ('k') | chrome/browser/views/new_profile_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698