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

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

Issue 118338: Add support for printing selection only flag. This only adds the flag to the ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/renderer/mock_render_thread.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "chrome/renderer/print_web_view_helper.h" 5 #include "chrome/renderer/print_web_view_helper.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/gfx/size.h" 9 #include "base/gfx/size.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 // Ask the browser to show UI to retrieve the final print settings. 121 // Ask the browser to show UI to retrieve the final print settings.
122 ViewMsg_PrintPages_Params print_settings; 122 ViewMsg_PrintPages_Params print_settings;
123 // host_window_ may be NULL at this point if the current window is a popup 123 // host_window_ may be NULL at this point if the current window is a popup
124 // and the print() command has been issued from the parent. The receiver 124 // and the print() command has been issued from the parent. The receiver
125 // of this message has to deal with this. 125 // of this message has to deal with this.
126 msg = new ViewHostMsg_ScriptedPrint(routing_id(), 126 msg = new ViewHostMsg_ScriptedPrint(routing_id(),
127 render_view_->host_window(), 127 render_view_->host_window(),
128 default_settings.document_cookie, 128 default_settings.document_cookie,
129 expected_pages_count, 129 expected_pages_count,
130 true, // has_selection
130 &print_settings); 131 &print_settings);
131 if (Send(msg)) { 132 if (Send(msg)) {
132 msg = NULL; 133 msg = NULL;
133 134
135 // Printing selection only not supported yet.
136 if (print_settings.params.selection_only) {
137 NOTIMPLEMENTED();
138 }
139
134 // If the settings are invalid, early quit. 140 // If the settings are invalid, early quit.
135 if (print_settings.params.dpi && 141 if (print_settings.params.dpi &&
136 print_settings.params.document_cookie) { 142 print_settings.params.document_cookie) {
137 // Render the printed pages. It will implicitly revert the document to 143 // Render the printed pages. It will implicitly revert the document to
138 // display CSS media type. 144 // display CSS media type.
139 PrintPages(print_settings, frame); 145 PrintPages(print_settings, frame);
140 // All went well. 146 // All went well.
141 return; 147 return;
142 } else { 148 } else {
143 // The user cancelled. 149 // The user cancelled.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 332
327 gfx::NativeViewId PrintWebViewHelper::GetContainingView(WebWidget* webwidget) { 333 gfx::NativeViewId PrintWebViewHelper::GetContainingView(WebWidget* webwidget) {
328 NOTREACHED(); 334 NOTREACHED();
329 return gfx::NativeViewId(); 335 return gfx::NativeViewId();
330 } 336 }
331 337
332 bool PrintWebViewHelper::IsHidden(WebWidget* webwidget) { 338 bool PrintWebViewHelper::IsHidden(WebWidget* webwidget) {
333 NOTREACHED(); 339 NOTREACHED();
334 return true; 340 return true;
335 } 341 }
OLDNEW
« no previous file with comments | « chrome/renderer/mock_render_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698