OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_VIEWS_CONFIRM_MESSAGE_BOX_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_CONFIRM_MESSAGE_BOX_DIALOG_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_CONFIRM_MESSAGE_BOX_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_CONFIRM_MESSAGE_BOX_DIALOG_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" |
13 #include "views/controls/label.h" | 13 #include "views/controls/label.h" |
14 #include "views/window/dialog_delegate.h" | 14 #include "views/window/dialog_delegate.h" |
15 | 15 |
16 // An interface the confirm dialog uses to notify its clients (observers) when | 16 // An interface the confirm dialog uses to notify its clients (observers) when |
17 // the user makes a decision to confirm or cancel. Only one method will be | 17 // the user makes a decision to confirm or cancel. Only one method will be |
18 // invoked per use (i.e per invocation of ConfirmMessageBoxDialog::Run). | 18 // invoked per use (i.e per invocation of ConfirmMessageBoxDialog::Run). |
19 class ConfirmMessageBoxObserver { | 19 class ConfirmMessageBoxObserver { |
20 public: | 20 public: |
21 // The user explicitly confirmed by clicking "OK". | 21 // The user explicitly confirmed by clicking "OK". |
22 virtual void OnConfirmMessageAccept() = 0; | 22 virtual void OnConfirmMessageAccept() = 0; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // The preferred size of the dialog. | 91 // The preferred size of the dialog. |
92 gfx::Size preferred_size_; | 92 gfx::Size preferred_size_; |
93 | 93 |
94 // The observer to notify of acceptance or cancellation. | 94 // The observer to notify of acceptance or cancellation. |
95 ConfirmMessageBoxObserver* observer_; | 95 ConfirmMessageBoxObserver* observer_; |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(ConfirmMessageBoxDialog); | 97 DISALLOW_COPY_AND_ASSIGN(ConfirmMessageBoxDialog); |
98 }; | 98 }; |
99 | 99 |
100 #endif // CHROME_BROWSER_UI_VIEWS_CONFIRM_MESSAGE_BOX_DIALOG_H_ | 100 #endif // CHROME_BROWSER_UI_VIEWS_CONFIRM_MESSAGE_BOX_DIALOG_H_ |
OLD | NEW |