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

Side by Side Diff: chrome/browser/ui/views/download/download_danger_prompt_views.cc

Issue 686533002: 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/download/download_feedback_dialog_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "chrome/browser/download/download_danger_prompt.h" 6 #include "chrome/browser/download/download_danger_prompt.h"
7 #include "chrome/browser/download/download_stats.h" 7 #include "chrome/browser/download/download_stats.h"
8 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s ampling.h" 8 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s ampling.h"
9 #include "chrome/grit/chromium_strings.h" 9 #include "chrome/grit/chromium_strings.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 23 matching lines...) Expand all
34 // formatting on the text in the body of the dialog. 34 // formatting on the text in the body of the dialog.
35 class DownloadDangerPromptViews : public DownloadDangerPrompt, 35 class DownloadDangerPromptViews : public DownloadDangerPrompt,
36 public content::DownloadItem::Observer, 36 public content::DownloadItem::Observer,
37 public views::DialogDelegate { 37 public views::DialogDelegate {
38 public: 38 public:
39 DownloadDangerPromptViews(content::DownloadItem* item, 39 DownloadDangerPromptViews(content::DownloadItem* item,
40 bool show_context, 40 bool show_context,
41 const OnDone& done); 41 const OnDone& done);
42 42
43 // DownloadDangerPrompt methods: 43 // DownloadDangerPrompt methods:
44 virtual void InvokeActionForTesting(Action action) override; 44 void InvokeActionForTesting(Action action) override;
45 45
46 // views::DialogDelegate methods: 46 // views::DialogDelegate methods:
47 virtual base::string16 GetDialogButtonLabel( 47 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
48 ui::DialogButton button) const override; 48 base::string16 GetWindowTitle() const override;
49 virtual base::string16 GetWindowTitle() const override; 49 void DeleteDelegate() override;
50 virtual void DeleteDelegate() override; 50 ui::ModalType GetModalType() const override;
51 virtual ui::ModalType GetModalType() const override; 51 bool Cancel() override;
52 virtual bool Cancel() override; 52 bool Accept() override;
53 virtual bool Accept() override; 53 bool Close() override;
54 virtual bool Close() override; 54 views::View* GetInitiallyFocusedView() override;
55 virtual views::View* GetInitiallyFocusedView() override; 55 views::View* GetContentsView() override;
56 virtual views::View* GetContentsView() override; 56 views::Widget* GetWidget() override;
57 virtual views::Widget* GetWidget() override; 57 const views::Widget* GetWidget() const override;
58 virtual const views::Widget* GetWidget() const override;
59 58
60 // content::DownloadItem::Observer: 59 // content::DownloadItem::Observer:
61 virtual void OnDownloadUpdated(content::DownloadItem* download) override; 60 void OnDownloadUpdated(content::DownloadItem* download) override;
62 61
63 private: 62 private:
64 base::string16 GetAcceptButtonTitle() const; 63 base::string16 GetAcceptButtonTitle() const;
65 base::string16 GetCancelButtonTitle() const; 64 base::string16 GetCancelButtonTitle() const;
66 // The message lead is separated from the main text and is bolded. 65 // The message lead is separated from the main text and is bolded.
67 base::string16 GetMessageLead() const; 66 base::string16 GetMessageLead() const;
68 base::string16 GetMessageBody() const; 67 base::string16 GetMessageBody() const;
69 void RunDone(Action action); 68 void RunDone(Action action);
70 69
71 content::DownloadItem* download_; 70 content::DownloadItem* download_;
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 DownloadDangerPrompt* DownloadDangerPrompt::Create( 345 DownloadDangerPrompt* DownloadDangerPrompt::Create(
347 content::DownloadItem* item, 346 content::DownloadItem* item,
348 content::WebContents* web_contents, 347 content::WebContents* web_contents,
349 bool show_context, 348 bool show_context,
350 const OnDone& done) { 349 const OnDone& done) {
351 DownloadDangerPromptViews* download_danger_prompt = 350 DownloadDangerPromptViews* download_danger_prompt =
352 new DownloadDangerPromptViews(item, show_context, done); 351 new DownloadDangerPromptViews(item, show_context, done);
353 ShowWebModalDialogViews(download_danger_prompt, web_contents); 352 ShowWebModalDialogViews(download_danger_prompt, web_contents);
354 return download_danger_prompt; 353 return download_danger_prompt;
355 } 354 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/download/download_feedback_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698