Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: chrome/browser/ui/views/simple_message_box_views.cc

Issue 680133002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 17 matching lines...) Expand all
28 namespace { 28 namespace {
29 29
30 class SimpleMessageBoxViews : public views::DialogDelegate { 30 class SimpleMessageBoxViews : public views::DialogDelegate {
31 public: 31 public:
32 SimpleMessageBoxViews(const base::string16& title, 32 SimpleMessageBoxViews(const base::string16& title,
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 ~SimpleMessageBoxViews() override;
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 int GetDialogButtons() const override;
44 virtual base::string16 GetDialogButtonLabel( 44 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
45 ui::DialogButton button) const override; 45 bool Cancel() override;
46 virtual bool Cancel() override; 46 bool Accept() override;
47 virtual bool Accept() override;
48 47
49 // Overridden from views::WidgetDelegate: 48 // Overridden from views::WidgetDelegate:
50 virtual base::string16 GetWindowTitle() const override; 49 base::string16 GetWindowTitle() const override;
51 virtual void DeleteDelegate() override; 50 void DeleteDelegate() override;
52 virtual ui::ModalType GetModalType() const override; 51 ui::ModalType GetModalType() const override;
53 virtual views::View* GetContentsView() override; 52 views::View* GetContentsView() override;
54 virtual views::Widget* GetWidget() override; 53 views::Widget* GetWidget() override;
55 virtual const views::Widget* GetWidget() const override; 54 const views::Widget* GetWidget() const override;
56 55
57 private: 56 private:
58 57
59 // This terminates the nested message-loop. 58 // This terminates the nested message-loop.
60 void Done(); 59 void Done();
61 60
62 const base::string16 window_title_; 61 const base::string16 window_title_;
63 const MessageBoxType type_; 62 const MessageBoxType type_;
64 base::string16 yes_text_; 63 base::string16 yes_text_;
65 base::string16 no_text_; 64 base::string16 no_text_;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 MessageBoxResult ShowMessageBoxWithButtonText(gfx::NativeWindow parent, 255 MessageBoxResult ShowMessageBoxWithButtonText(gfx::NativeWindow parent,
257 const base::string16& title, 256 const base::string16& title,
258 const base::string16& message, 257 const base::string16& message,
259 const base::string16& yes_text, 258 const base::string16& yes_text,
260 const base::string16& no_text) { 259 const base::string16& no_text) {
261 return ShowMessageBoxImpl( 260 return ShowMessageBoxImpl(
262 parent, title, message, MESSAGE_BOX_TYPE_QUESTION, yes_text, no_text); 261 parent, title, message, MESSAGE_BOX_TYPE_QUESTION, yes_text, no_text);
263 } 262 }
264 263
265 } // namespace chrome 264 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698