OLD | NEW |
(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 // A dialog box that prompts the user to enter a profile name, and opens a new |
| 6 // window in that profile. |
| 7 |
| 8 #ifndef CHROME_BROWSER_VIEWS_NEW_PROFILE_DIALOG_H_ |
| 9 #define CHROME_BROWSER_VIEWS_NEW_PROFILE_DIALOG_H_ |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "base/message_loop.h" |
| 13 #include "chrome/browser/shell_dialogs.h" |
| 14 #include "chrome/views/dialog_delegate.h" |
| 15 #include "chrome/views/text_field.h" |
| 16 |
| 17 class MessageBoxView; |
| 18 namespace views { |
| 19 class View; |
| 20 class Window; |
| 21 } |
| 22 |
| 23 // Dialog that prompts the user to create a new profile. |
| 24 class NewProfileDialog : public views::DialogDelegate, |
| 25 public views::TextField::Controller { |
| 26 public: |
| 27 // Creates and runs the dialog. |
| 28 static void RunDialog(); |
| 29 virtual ~NewProfileDialog(); |
| 30 |
| 31 // views::DialogDelegate methods. |
| 32 virtual bool Accept(); |
| 33 virtual int GetDialogButtons() const; |
| 34 virtual views::View* GetInitiallyFocusedView() const; |
| 35 virtual bool IsDialogButtonEnabled(DialogButton button) const; |
| 36 virtual std::wstring GetWindowTitle() const; |
| 37 virtual void WindowClosing(); |
| 38 |
| 39 // views::TextField::Controller methods. |
| 40 virtual void ContentsChanged(views::TextField* sender, |
| 41 const std::wstring& new_contents); |
| 42 virtual void HandleKeystroke(views::TextField* sender, |
| 43 UINT message, TCHAR key, UINT repeat_count, |
| 44 UINT flags) {} |
| 45 |
| 46 // views::WindowDelegate methods. |
| 47 virtual views::View* GetContentsView(); |
| 48 virtual bool IsAlwaysOnTop() const { return false; } |
| 49 virtual bool IsModal() const { return false; } |
| 50 |
| 51 private: |
| 52 NewProfileDialog(); |
| 53 |
| 54 MessageBoxView* message_box_view_; |
| 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(NewProfileDialog); |
| 57 }; |
| 58 |
| 59 #endif // CHROME_BROWSER_VIEWS_NEW_PROFILE_DIALOG_H_ |
OLD | NEW |