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/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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 virtual ~PrintPreviewDialogDelegate(); |
73 | 73 |
74 virtual ui::ModalType GetDialogModalType() const OVERRIDE; | 74 virtual ui::ModalType GetDialogModalType() const override; |
75 virtual base::string16 GetDialogTitle() const OVERRIDE; | 75 virtual base::string16 GetDialogTitle() const override; |
76 virtual GURL GetDialogContentURL() const OVERRIDE; | 76 virtual GURL GetDialogContentURL() const override; |
77 virtual void GetWebUIMessageHandlers( | 77 virtual 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 virtual void GetDialogSize(gfx::Size* size) const override; |
80 virtual std::string GetDialogArgs() const OVERRIDE; | 80 virtual std::string GetDialogArgs() const override; |
81 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; | 81 virtual void OnDialogClosed(const std::string& json_retval) override; |
82 virtual void OnCloseContents(WebContents* source, | 82 virtual void OnCloseContents(WebContents* source, |
83 bool* out_close_dialog) OVERRIDE; | 83 bool* out_close_dialog) override; |
84 virtual bool ShouldShowDialogTitle() const OVERRIDE; | 84 virtual bool ShouldShowDialogTitle() const override; |
85 | 85 |
86 private: | 86 private: |
87 WebContents* initiator_; | 87 WebContents* initiator_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogDelegate); | 89 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogDelegate); |
90 }; | 90 }; |
91 | 91 |
92 PrintPreviewDialogDelegate::PrintPreviewDialogDelegate(WebContents* initiator) | 92 PrintPreviewDialogDelegate::PrintPreviewDialogDelegate(WebContents* initiator) |
93 : initiator_(initiator) { | 93 : initiator_(initiator) { |
94 } | 94 } |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 static_cast<PrintPreviewUI*>(web_ui->GetController()); | 473 static_cast<PrintPreviewUI*>(web_ui->GetController()); |
474 if (print_preview_ui) | 474 if (print_preview_ui) |
475 print_preview_ui->OnPrintPreviewDialogDestroyed(); | 475 print_preview_ui->OnPrintPreviewDialogDestroyed(); |
476 } | 476 } |
477 | 477 |
478 preview_dialog_map_.erase(preview_dialog); | 478 preview_dialog_map_.erase(preview_dialog); |
479 RemoveObservers(preview_dialog); | 479 RemoveObservers(preview_dialog); |
480 } | 480 } |
481 | 481 |
482 } // namespace printing | 482 } // namespace printing |
OLD | NEW |