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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 bool OnMessageReceived(const IPC::Message& message) override; | 121 bool OnMessageReceived(const IPC::Message& message) override; |
122 void PrintPage(blink::WebLocalFrame* frame, bool user_initiated) override; | 122 void PrintPage(blink::WebLocalFrame* frame, bool user_initiated) override; |
123 void DidStartLoading() override; | 123 void DidStartLoading() override; |
124 void DidStopLoading() override; | 124 void DidStopLoading() override; |
125 | 125 |
126 // Message handlers --------------------------------------------------------- | 126 // Message handlers --------------------------------------------------------- |
127 #if !defined(DISABLE_BASIC_PRINTING) | 127 #if defined(ENABLE_BASIC_PRINTING) |
128 void OnPrintPages(); | 128 void OnPrintPages(); |
129 void OnPrintForSystemDialog(); | 129 void OnPrintForSystemDialog(); |
130 #endif // !DISABLE_BASIC_PRINTING | 130 #endif // ENABLE_BASIC_PRINTING |
131 void OnInitiatePrintPreview(bool selection_only); | 131 void OnInitiatePrintPreview(bool selection_only); |
132 void OnPrintPreview(const base::DictionaryValue& settings); | 132 void OnPrintPreview(const base::DictionaryValue& settings); |
133 void OnPrintForPrintPreview(const base::DictionaryValue& job_settings); | 133 void OnPrintForPrintPreview(const base::DictionaryValue& job_settings); |
134 void OnPrintingDone(bool success); | 134 void OnPrintingDone(bool success); |
135 | 135 |
136 // Get |page_size| and |content_area| information from | 136 // Get |page_size| and |content_area| information from |
137 // |page_layout_in_points|. | 137 // |page_layout_in_points|. |
138 void GetPageSizeAndContentAreaFromPageLayout( | 138 void GetPageSizeAndContentAreaFromPageLayout( |
139 const PageSizeMargins& page_layout_in_points, | 139 const PageSizeMargins& page_layout_in_points, |
140 gfx::Size* page_size, | 140 gfx::Size* page_size, |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 base::Closure on_stop_loading_closure_; | 460 base::Closure on_stop_loading_closure_; |
461 | 461 |
462 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; | 462 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; |
463 | 463 |
464 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 464 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
465 }; | 465 }; |
466 | 466 |
467 } // namespace printing | 467 } // namespace printing |
468 | 468 |
469 #endif // CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ | 469 #endif // CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ |
OLD | NEW |