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

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

Issue 6539011: Fix for Issue 73274: Printing causes view to scroll (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: 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 | « no previous file | 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 const gfx::Size& GetPrintCanvasSize() const { 60 const gfx::Size& GetPrintCanvasSize() const {
61 return print_canvas_size_; 61 return print_canvas_size_;
62 } 62 }
63 63
64 private: 64 private:
65 WebKit::WebFrame* frame_; 65 WebKit::WebFrame* frame_;
66 WebKit::WebView* web_view_; 66 WebKit::WebView* web_view_;
67 gfx::Size print_canvas_size_; 67 gfx::Size print_canvas_size_;
68 gfx::Size prev_view_size_; 68 gfx::Size prev_view_size_;
69 gfx::Size prev_scroll_offset_;
69 int expected_pages_count_; 70 int expected_pages_count_;
70 bool use_browser_overlays_; 71 bool use_browser_overlays_;
71 72
72 DISALLOW_COPY_AND_ASSIGN(PrepareFrameAndViewForPrint); 73 DISALLOW_COPY_AND_ASSIGN(PrepareFrameAndViewForPrint);
73 }; 74 };
74 75
75 76
76 // PrintWebViewHelper handles most of the printing grunt work for RenderView. 77 // PrintWebViewHelper handles most of the printing grunt work for RenderView.
77 // We plan on making print asynchronous and that will require copying the DOM 78 // We plan on making print asynchronous and that will require copying the DOM
78 // of the document and creating a new WebView with the contents. 79 // of the document and creating a new WebView with the contents.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 scoped_ptr<ViewMsg_PrintPages_Params> print_pages_params_; 200 scoped_ptr<ViewMsg_PrintPages_Params> print_pages_params_;
200 base::Time last_cancelled_script_print_; 201 base::Time last_cancelled_script_print_;
201 int user_cancelled_scripted_print_count_; 202 int user_cancelled_scripted_print_count_;
202 bool is_preview_; 203 bool is_preview_;
203 204
204 private: 205 private:
205 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); 206 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper);
206 }; 207 };
207 208
208 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 209 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698