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

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

Issue 206033: Print the frame where the window.print() call origins from.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | 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/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 void RenderView::didAddMessageToConsole( 1364 void RenderView::didAddMessageToConsole(
1365 const WebConsoleMessage& message, const WebString& source_name, 1365 const WebConsoleMessage& message, const WebString& source_name,
1366 unsigned source_line) { 1366 unsigned source_line) {
1367 Send(new ViewHostMsg_AddMessageToConsole(routing_id_, 1367 Send(new ViewHostMsg_AddMessageToConsole(routing_id_,
1368 UTF16ToWideHack(message.text), 1368 UTF16ToWideHack(message.text),
1369 static_cast<int32>(source_line), 1369 static_cast<int32>(source_line),
1370 UTF16ToWideHack(source_name))); 1370 UTF16ToWideHack(source_name)));
1371 } 1371 }
1372 1372
1373 void RenderView::printPage(WebFrame* frame) { 1373 void RenderView::printPage(WebFrame* frame) {
1374 DCHECK(webview()); 1374 DCHECK(frame);
1375 if (webview()) { 1375 Print(frame, true);
1376 // Print the full page - not just the frame the javascript is running from.
1377 Print(webview()->GetMainFrame(), true);
1378 }
1379 } 1376 }
1380 1377
1381 void RenderView::didStartLoading() { 1378 void RenderView::didStartLoading() {
1382 if (is_loading_) { 1379 if (is_loading_) {
1383 DLOG(WARNING) << "didStartLoading called while loading"; 1380 DLOG(WARNING) << "didStartLoading called while loading";
1384 return; 1381 return;
1385 } 1382 }
1386 1383
1387 is_loading_ = true; 1384 is_loading_ = true;
1388 // Clear the pointer so that we can assign it only when there is an unknown 1385 // Clear the pointer so that we can assign it only when there is an unknown
(...skipping 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after
3577 // TODO(darin): There's actually no reason for this to be here. We should 3574 // TODO(darin): There's actually no reason for this to be here. We should
3578 // have the browser side manage the document tag. 3575 // have the browser side manage the document tag.
3579 #if defined(OS_MACOSX) 3576 #if defined(OS_MACOSX)
3580 if (!has_document_tag_) { 3577 if (!has_document_tag_) {
3581 // Make the call to get the tag. 3578 // Make the call to get the tag.
3582 Send(new ViewHostMsg_GetDocumentTag(routing_id_, &document_tag_)); 3579 Send(new ViewHostMsg_GetDocumentTag(routing_id_, &document_tag_));
3583 has_document_tag_ = true; 3580 has_document_tag_ = true;
3584 } 3581 }
3585 #endif 3582 #endif
3586 } 3583 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698