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 #ifndef COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 5 #ifndef COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
6 #define COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 6 #define COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 PRINT_PREVIEW_USER_INITIATED_SELECTION, | 159 PRINT_PREVIEW_USER_INITIATED_SELECTION, |
160 PRINT_PREVIEW_USER_INITIATED_CONTEXT_NODE, | 160 PRINT_PREVIEW_USER_INITIATED_CONTEXT_NODE, |
161 PRINT_PREVIEW_SCRIPTED // triggered by window.print(). | 161 PRINT_PREVIEW_SCRIPTED // triggered by window.print(). |
162 }; | 162 }; |
163 | 163 |
164 // RenderViewObserver implementation. | 164 // RenderViewObserver implementation. |
165 bool OnMessageReceived(const IPC::Message& message) override; | 165 bool OnMessageReceived(const IPC::Message& message) override; |
166 void PrintPage(blink::WebLocalFrame* frame, bool user_initiated) override; | 166 void PrintPage(blink::WebLocalFrame* frame, bool user_initiated) override; |
167 void DidStartLoading() override; | 167 void DidStartLoading() override; |
168 void DidStopLoading() override; | 168 void DidStopLoading() override; |
| 169 void OnDestruct() override; |
169 | 170 |
170 // Message handlers --------------------------------------------------------- | 171 // Message handlers --------------------------------------------------------- |
171 #if defined(ENABLE_BASIC_PRINTING) | 172 #if defined(ENABLE_BASIC_PRINTING) |
172 void OnPrintPages(); | 173 void OnPrintPages(); |
173 void OnPrintForSystemDialog(); | 174 void OnPrintForSystemDialog(); |
174 void OnPrintForPrintPreview(const base::DictionaryValue& job_settings); | 175 void OnPrintForPrintPreview(const base::DictionaryValue& job_settings); |
175 #endif // defined(ENABLE_BASIC_PRINTING) | 176 #endif // defined(ENABLE_BASIC_PRINTING) |
176 #if defined(ENABLE_PRINT_PREVIEW) | 177 #if defined(ENABLE_PRINT_PREVIEW) |
177 void OnInitiatePrintPreview(bool selection_only); | 178 void OnInitiatePrintPreview(bool selection_only); |
178 void OnPrintPreview(const base::DictionaryValue& settings); | 179 void OnPrintPreview(const base::DictionaryValue& settings); |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 base::Closure on_stop_loading_closure_; | 525 base::Closure on_stop_loading_closure_; |
525 | 526 |
526 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; | 527 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; |
527 | 528 |
528 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 529 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
529 }; | 530 }; |
530 | 531 |
531 } // namespace printing | 532 } // namespace printing |
532 | 533 |
533 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 534 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
OLD | NEW |