| 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 #ifndef CHROME_BROWSER_UI_VIEWS_BASE_SHELL_DIALOG_WIN_H_ | 5 #ifndef UI_BASE_DIALOGS_BASE_SHELL_DIALOG_WIN_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_BASE_SHELL_DIALOG_WIN_H_ | 6 #define UI_BASE_DIALOGS_BASE_SHELL_DIALOG_WIN_H_ |
| 7 | 7 |
| 8 #include <shlobj.h> | 8 #include <shlobj.h> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "ui/base/ui_export.h" |
| 11 #include "ui/base/dialogs/base_shell_dialog.h" | 12 #include "ui/base/dialogs/base_shell_dialog.h" |
| 12 | 13 |
| 13 namespace base { | 14 namespace base { |
| 14 class Thread; | 15 class Thread; |
| 15 } | 16 } |
| 16 | 17 |
| 18 namespace ui { |
| 19 |
| 17 /////////////////////////////////////////////////////////////////////////////// | 20 /////////////////////////////////////////////////////////////////////////////// |
| 18 // A base class for all shell dialog implementations that handles showing a | 21 // A base class for all shell dialog implementations that handles showing a |
| 19 // shell dialog modally on its own thread. | 22 // shell dialog modally on its own thread. |
| 20 class BaseShellDialogImpl { | 23 class UI_EXPORT BaseShellDialogImpl { |
| 21 public: | 24 public: |
| 22 BaseShellDialogImpl(); | 25 BaseShellDialogImpl(); |
| 23 virtual ~BaseShellDialogImpl(); | 26 virtual ~BaseShellDialogImpl(); |
| 24 | 27 |
| 25 protected: | 28 protected: |
| 26 // Represents a run of a dialog. | 29 // Represents a run of a dialog. |
| 27 struct RunState { | 30 struct UI_EXPORT RunState { |
| 28 // Owning HWND, may be null. | 31 // Owning HWND, may be null. |
| 29 HWND owner; | 32 HWND owner; |
| 30 | 33 |
| 31 // Thread dialog is run on. | 34 // Thread dialog is run on. |
| 32 base::Thread* dialog_thread; | 35 base::Thread* dialog_thread; |
| 33 }; | 36 }; |
| 34 | 37 |
| 35 // Called at the beginning of a modal dialog run. Disables the owner window | 38 // Called at the beginning of a modal dialog run. Disables the owner window |
| 36 // and tracks it. Returns the message loop of the thread that the dialog will | 39 // and tracks it. Returns the message loop of the thread that the dialog will |
| 37 // be run on. | 40 // be run on. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // same owner, even though they might be represented by different instances | 85 // same owner, even though they might be represented by different instances |
| 83 // of this object. | 86 // of this object. |
| 84 // This set only contains non-null HWNDs. NULL hwnds are not added to this | 87 // This set only contains non-null HWNDs. NULL hwnds are not added to this |
| 85 // list. | 88 // list. |
| 86 static Owners owners_; | 89 static Owners owners_; |
| 87 static int instance_count_; | 90 static int instance_count_; |
| 88 | 91 |
| 89 DISALLOW_COPY_AND_ASSIGN(BaseShellDialogImpl); | 92 DISALLOW_COPY_AND_ASSIGN(BaseShellDialogImpl); |
| 90 }; | 93 }; |
| 91 | 94 |
| 92 #endif // CHROME_BROWSER_UI_VIEWS_BASE_SHELL_DIALOG_WIN_H_ | 95 } // namespace ui |
| 96 |
| 97 #endif // UI_BASE_DIALOGS_BASE_SHELL_DIALOG_WIN_H_ |
| OLD | NEW |