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

Side by Side Diff: chrome/browser/printing/print_preview_dialog_controller.cc

Issue 668093002: Standardize usage of virtual/override/final in chrome/browser/printing/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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/printing/print_preview_dialog_controller.h" 5 #include "chrome/browser/printing/print_preview_dialog_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ChromePluginServiceFilter::GetInstance()->OverridePluginForFrame( 62 ChromePluginServiceFilter::GetInstance()->OverridePluginForFrame(
63 preview_dialog->GetRenderProcessHost()->GetID(), 63 preview_dialog->GetRenderProcessHost()->GetID(),
64 preview_dialog->GetMainFrame()->GetRoutingID(), 64 preview_dialog->GetMainFrame()->GetRoutingID(),
65 GURL(), pdf_plugin); 65 GURL(), pdf_plugin);
66 } 66 }
67 67
68 // A ui::WebDialogDelegate that specifies the print preview dialog appearance. 68 // A ui::WebDialogDelegate that specifies the print preview dialog appearance.
69 class PrintPreviewDialogDelegate : public ui::WebDialogDelegate { 69 class PrintPreviewDialogDelegate : public ui::WebDialogDelegate {
70 public: 70 public:
71 explicit PrintPreviewDialogDelegate(WebContents* initiator); 71 explicit PrintPreviewDialogDelegate(WebContents* initiator);
72 virtual ~PrintPreviewDialogDelegate(); 72 ~PrintPreviewDialogDelegate() override;
73 73
74 virtual ui::ModalType GetDialogModalType() const override; 74 ui::ModalType GetDialogModalType() const override;
75 virtual base::string16 GetDialogTitle() const override; 75 base::string16 GetDialogTitle() const override;
76 virtual GURL GetDialogContentURL() const override; 76 GURL GetDialogContentURL() const override;
77 virtual void GetWebUIMessageHandlers( 77 void GetWebUIMessageHandlers(
78 std::vector<WebUIMessageHandler*>* handlers) const override; 78 std::vector<WebUIMessageHandler*>* handlers) const override;
79 virtual void GetDialogSize(gfx::Size* size) const override; 79 void GetDialogSize(gfx::Size* size) const override;
80 virtual std::string GetDialogArgs() const override; 80 std::string GetDialogArgs() const override;
81 virtual void OnDialogClosed(const std::string& json_retval) override; 81 void OnDialogClosed(const std::string& json_retval) override;
82 virtual void OnCloseContents(WebContents* source, 82 void OnCloseContents(WebContents* source, bool* out_close_dialog) override;
83 bool* out_close_dialog) override; 83 bool ShouldShowDialogTitle() const override;
84 virtual bool ShouldShowDialogTitle() const override;
85 84
86 private: 85 private:
87 WebContents* initiator_; 86 WebContents* initiator_;
88 87
89 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogDelegate); 88 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogDelegate);
90 }; 89 };
91 90
92 PrintPreviewDialogDelegate::PrintPreviewDialogDelegate(WebContents* initiator) 91 PrintPreviewDialogDelegate::PrintPreviewDialogDelegate(WebContents* initiator)
93 : initiator_(initiator) { 92 : initiator_(initiator) {
94 } 93 }
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 static_cast<PrintPreviewUI*>(web_ui->GetController()); 472 static_cast<PrintPreviewUI*>(web_ui->GetController());
474 if (print_preview_ui) 473 if (print_preview_ui)
475 print_preview_ui->OnPrintPreviewDialogDestroyed(); 474 print_preview_ui->OnPrintPreviewDialogDestroyed();
476 } 475 }
477 476
478 preview_dialog_map_.erase(preview_dialog); 477 preview_dialog_map_.erase(preview_dialog);
479 RemoveObservers(preview_dialog); 478 RemoveObservers(preview_dialog);
480 } 479 }
481 480
482 } // namespace printing 481 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698