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 #include "chrome/browser/ui/simple_message_box.h" | 5 #include "chrome/browser/ui/simple_message_box.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 const base::string16& message, | 33 const base::string16& message, |
34 MessageBoxType type, | 34 MessageBoxType type, |
35 const base::string16& yes_text, | 35 const base::string16& yes_text, |
36 const base::string16& no_text, | 36 const base::string16& no_text, |
37 bool is_system_modal); | 37 bool is_system_modal); |
38 virtual ~SimpleMessageBoxViews(); | 38 virtual ~SimpleMessageBoxViews(); |
39 | 39 |
40 MessageBoxResult RunDialogAndGetResult(); | 40 MessageBoxResult RunDialogAndGetResult(); |
41 | 41 |
42 // Overridden from views::DialogDelegate: | 42 // Overridden from views::DialogDelegate: |
43 virtual int GetDialogButtons() const OVERRIDE; | 43 virtual int GetDialogButtons() const override; |
44 virtual base::string16 GetDialogButtonLabel( | 44 virtual base::string16 GetDialogButtonLabel( |
45 ui::DialogButton button) const OVERRIDE; | 45 ui::DialogButton button) const override; |
46 virtual bool Cancel() OVERRIDE; | 46 virtual bool Cancel() override; |
47 virtual bool Accept() OVERRIDE; | 47 virtual bool Accept() override; |
48 | 48 |
49 // Overridden from views::WidgetDelegate: | 49 // Overridden from views::WidgetDelegate: |
50 virtual base::string16 GetWindowTitle() const OVERRIDE; | 50 virtual base::string16 GetWindowTitle() const override; |
51 virtual void DeleteDelegate() OVERRIDE; | 51 virtual void DeleteDelegate() override; |
52 virtual ui::ModalType GetModalType() const OVERRIDE; | 52 virtual ui::ModalType GetModalType() const override; |
53 virtual views::View* GetContentsView() OVERRIDE; | 53 virtual views::View* GetContentsView() override; |
54 virtual views::Widget* GetWidget() OVERRIDE; | 54 virtual views::Widget* GetWidget() override; |
55 virtual const views::Widget* GetWidget() const OVERRIDE; | 55 virtual const views::Widget* GetWidget() const override; |
56 | 56 |
57 private: | 57 private: |
58 | 58 |
59 // This terminates the nested message-loop. | 59 // This terminates the nested message-loop. |
60 void Done(); | 60 void Done(); |
61 | 61 |
62 const base::string16 window_title_; | 62 const base::string16 window_title_; |
63 const MessageBoxType type_; | 63 const MessageBoxType type_; |
64 base::string16 yes_text_; | 64 base::string16 yes_text_; |
65 base::string16 no_text_; | 65 base::string16 no_text_; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 MessageBoxResult ShowMessageBoxWithButtonText(gfx::NativeWindow parent, | 256 MessageBoxResult ShowMessageBoxWithButtonText(gfx::NativeWindow parent, |
257 const base::string16& title, | 257 const base::string16& title, |
258 const base::string16& message, | 258 const base::string16& message, |
259 const base::string16& yes_text, | 259 const base::string16& yes_text, |
260 const base::string16& no_text) { | 260 const base::string16& no_text) { |
261 return ShowMessageBoxImpl( | 261 return ShowMessageBoxImpl( |
262 parent, title, message, MESSAGE_BOX_TYPE_QUESTION, yes_text, no_text); | 262 parent, title, message, MESSAGE_BOX_TYPE_QUESTION, yes_text, no_text); |
263 } | 263 } |
264 | 264 |
265 } // namespace chrome | 265 } // namespace chrome |
OLD | NEW |