OLD | NEW |
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 // A dialog box that tells the user that we can't write to the specified user | 5 // A dialog box that tells the user that we can't write to the specified user |
6 // data directory. Provides the user a chance to pick a different directory. | 6 // data directory. Provides the user a chance to pick a different directory. |
7 | 7 |
8 #ifndef CHROME_BROWSER_UI_VIEWS_USER_DATA_DIR_DIALOG_H_ | 8 #ifndef CHROME_BROWSER_UI_VIEWS_USER_DATA_DIR_DIALOG_H_ |
9 #define CHROME_BROWSER_UI_VIEWS_USER_DATA_DIR_DIALOG_H_ | 9 #define CHROME_BROWSER_UI_VIEWS_USER_DATA_DIR_DIALOG_H_ |
10 #pragma once | 10 #pragma once |
(...skipping 28 matching lines...) Expand all Loading... |
39 virtual void DeleteDelegate() OVERRIDE; | 39 virtual void DeleteDelegate() OVERRIDE; |
40 virtual bool Accept() OVERRIDE; | 40 virtual bool Accept() OVERRIDE; |
41 virtual bool Cancel() OVERRIDE; | 41 virtual bool Cancel() OVERRIDE; |
42 | 42 |
43 // views::WidgetDelegate methods: | 43 // views::WidgetDelegate methods: |
44 virtual views::View* GetContentsView() OVERRIDE; | 44 virtual views::View* GetContentsView() OVERRIDE; |
45 virtual views::Widget* GetWidget() OVERRIDE; | 45 virtual views::Widget* GetWidget() OVERRIDE; |
46 virtual const views::Widget* GetWidget() const OVERRIDE; | 46 virtual const views::Widget* GetWidget() const OVERRIDE; |
47 | 47 |
48 // MessageLoop::Dispatcher method: | 48 // MessageLoop::Dispatcher method: |
49 virtual bool Dispatch(const MSG& msg) OVERRIDE; | 49 virtual bool Dispatch(const base::NativeEvent& msg) OVERRIDE; |
50 | 50 |
51 // SelectFileDialog::Listener methods: | 51 // SelectFileDialog::Listener methods: |
52 virtual void FileSelected(const FilePath& path, | 52 virtual void FileSelected(const FilePath& path, |
53 int index, | 53 int index, |
54 void* params) OVERRIDE; | 54 void* params) OVERRIDE; |
55 virtual void FileSelectionCanceled(void* params) OVERRIDE; | 55 virtual void FileSelectionCanceled(void* params) OVERRIDE; |
56 | 56 |
57 private: | 57 private: |
58 explicit UserDataDirDialog(const FilePath& user_data_dir); | 58 explicit UserDataDirDialog(const FilePath& user_data_dir); |
59 | 59 |
60 // Empty until the user picks a directory. | 60 // Empty until the user picks a directory. |
61 FilePath user_data_dir_; | 61 FilePath user_data_dir_; |
62 | 62 |
63 views::MessageBoxView* message_box_view_; | 63 views::MessageBoxView* message_box_view_; |
64 scoped_refptr<SelectFileDialog> select_file_dialog_; | 64 scoped_refptr<SelectFileDialog> select_file_dialog_; |
65 | 65 |
66 // Used to keep track of whether or not to block the message loop (still | 66 // Used to keep track of whether or not to block the message loop (still |
67 // waiting for the user to dismiss the dialog). | 67 // waiting for the user to dismiss the dialog). |
68 bool is_blocking_; | 68 bool is_blocking_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(UserDataDirDialog); | 70 DISALLOW_COPY_AND_ASSIGN(UserDataDirDialog); |
71 }; | 71 }; |
72 | 72 |
73 #endif // CHROME_BROWSER_UI_VIEWS_USER_DATA_DIR_DIALOG_H_ | 73 #endif // CHROME_BROWSER_UI_VIEWS_USER_DATA_DIR_DIALOG_H_ |
OLD | NEW |