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

Side by Side Diff: chrome/renderer/print_web_view_helper.h

Issue 6479004: Print Preview: Hook up the print button to initiate a normal print operation.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: add a comment Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PRINT_WEB_VIEW_HELPER_H_ 5 #ifndef CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 explicit PrintWebViewHelper(RenderView* render_view); 82 explicit PrintWebViewHelper(RenderView* render_view);
83 virtual ~PrintWebViewHelper(); 83 virtual ~PrintWebViewHelper();
84 84
85 // Prints |frame|. 85 // Prints |frame|.
86 void PrintFrame(WebKit::WebFrame* frame, 86 void PrintFrame(WebKit::WebFrame* frame,
87 bool script_initiated, 87 bool script_initiated,
88 bool is_preview); 88 bool is_preview);
89 89
90 // Message handlers. Public for testing. 90 // Message handlers. Public for testing.
91 void OnPrintingDone(int document_cookie, bool success); 91 void OnPrintingDone(int document_cookie, bool success);
92 void OnPrintForPrintPreview();
92 void OnPrintPages(); 93 void OnPrintPages();
93 void OnPrintPreview(); 94 void OnPrintPreview();
94 void OnPrintNodeUnderContextMenu(); 95 void OnPrintNodeUnderContextMenu();
95 96
96 protected: 97 protected:
97 bool CopyAndPrint(WebKit::WebFrame* web_frame); 98 bool CopyAndPrint(WebKit::WebFrame* web_frame);
98 99
99 // Prints the page listed in |params|. 100 // Prints the page listed in |params|.
100 #if defined(USE_X11) 101 #if defined(USE_X11)
101 void PrintPage(const ViewMsg_PrintPage_Params& params, 102 void PrintPage(const ViewMsg_PrintPage_Params& params,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 scoped_ptr<ViewMsg_PrintPages_Params> print_pages_params_; 199 scoped_ptr<ViewMsg_PrintPages_Params> print_pages_params_;
199 base::Time last_cancelled_script_print_; 200 base::Time last_cancelled_script_print_;
200 int user_cancelled_scripted_print_count_; 201 int user_cancelled_scripted_print_count_;
201 bool is_preview_; 202 bool is_preview_;
202 203
203 private: 204 private:
204 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); 205 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper);
205 }; 206 };
206 207
207 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 208 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698