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 CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ | 5 #ifndef CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ |
6 #define CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ | 6 #define CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 }; | 111 }; |
112 | 112 |
113 enum PrintPreviewRequestType { | 113 enum PrintPreviewRequestType { |
114 PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME, | 114 PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME, |
115 PRINT_PREVIEW_USER_INITIATED_SELECTION, | 115 PRINT_PREVIEW_USER_INITIATED_SELECTION, |
116 PRINT_PREVIEW_USER_INITIATED_CONTEXT_NODE, | 116 PRINT_PREVIEW_USER_INITIATED_CONTEXT_NODE, |
117 PRINT_PREVIEW_SCRIPTED // triggered by window.print(). | 117 PRINT_PREVIEW_SCRIPTED // triggered by window.print(). |
118 }; | 118 }; |
119 | 119 |
120 // RenderViewObserver implementation. | 120 // RenderViewObserver implementation. |
121 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 121 virtual bool OnMessageReceived(const IPC::Message& message) override; |
122 virtual void PrintPage(blink::WebLocalFrame* frame, | 122 virtual void PrintPage(blink::WebLocalFrame* frame, |
123 bool user_initiated) OVERRIDE; | 123 bool user_initiated) override; |
124 virtual void DidStartLoading() OVERRIDE; | 124 virtual void DidStartLoading() override; |
125 virtual void DidStopLoading() OVERRIDE; | 125 virtual void DidStopLoading() override; |
126 | 126 |
127 // Message handlers --------------------------------------------------------- | 127 // Message handlers --------------------------------------------------------- |
128 #if !defined(DISABLE_BASIC_PRINTING) | 128 #if !defined(DISABLE_BASIC_PRINTING) |
129 void OnPrintPages(); | 129 void OnPrintPages(); |
130 void OnPrintForSystemDialog(); | 130 void OnPrintForSystemDialog(); |
131 #endif // !DISABLE_BASIC_PRINTING | 131 #endif // !DISABLE_BASIC_PRINTING |
132 void OnInitiatePrintPreview(bool selection_only); | 132 void OnInitiatePrintPreview(bool selection_only); |
133 void OnPrintPreview(const base::DictionaryValue& settings); | 133 void OnPrintPreview(const base::DictionaryValue& settings); |
134 void OnPrintForPrintPreview(const base::DictionaryValue& job_settings); | 134 void OnPrintForPrintPreview(const base::DictionaryValue& job_settings); |
135 void OnPrintingDone(bool success); | 135 void OnPrintingDone(bool success); |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 base::Closure on_stop_loading_closure_; | 461 base::Closure on_stop_loading_closure_; |
462 | 462 |
463 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; | 463 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; |
464 | 464 |
465 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 465 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
466 }; | 466 }; |
467 | 467 |
468 } // namespace printing | 468 } // namespace printing |
469 | 469 |
470 #endif // CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ | 470 #endif // CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ |
OLD | NEW |