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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2508923003: Make printing work better with OOPIF. (try 2) (Closed)
Patch Set: Fix android_webview Created 4 years, 1 month 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | ipc/ipc_message_macros.h » ('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) 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 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript", 1492 UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript",
1493 frame->top() == frame); 1493 frame->top() == frame);
1494 1494
1495 // Logging whether the top frame is remote is sufficient in this case. If 1495 // Logging whether the top frame is remote is sufficient in this case. If
1496 // the top frame is local, the printing code will function correctly and 1496 // the top frame is local, the printing code will function correctly and
1497 // the frame itself will be printed, so the cases this histogram tracks is 1497 // the frame itself will be printed, so the cases this histogram tracks is
1498 // where printing of a subframe will fail as of now. 1498 // where printing of a subframe will fail as of now.
1499 UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe", 1499 UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe",
1500 frame->top()->isWebRemoteFrame()); 1500 frame->top()->isWebRemoteFrame());
1501 1501
1502 for (auto& observer : observers_) 1502 RenderFrameImpl::FromWebFrame(frame)->ScriptedPrint(
1503 observer.PrintPage(frame, input_handler().handling_input_event()); 1503 input_handler().handling_input_event());
1504 } 1504 }
1505 1505
1506 bool RenderViewImpl::enumerateChosenDirectory( 1506 bool RenderViewImpl::enumerateChosenDirectory(
1507 const WebString& path, 1507 const WebString& path,
1508 WebFileChooserCompletion* chooser_completion) { 1508 WebFileChooserCompletion* chooser_completion) {
1509 int id = enumeration_completion_id_++; 1509 int id = enumeration_completion_id_++;
1510 enumeration_completions_[id] = chooser_completion; 1510 enumeration_completions_[id] = chooser_completion;
1511 return Send(new ViewHostMsg_EnumerateDirectory( 1511 return Send(new ViewHostMsg_EnumerateDirectory(
1512 GetRoutingID(), id, blink::WebStringToFilePath(path))); 1512 GetRoutingID(), id, blink::WebStringToFilePath(path)));
1513 } 1513 }
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2777 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2777 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2778 } 2778 }
2779 2779
2780 std::unique_ptr<InputEventAck> ack( 2780 std::unique_ptr<InputEventAck> ack(
2781 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, 2781 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type,
2782 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2782 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2783 OnInputEventAck(std::move(ack)); 2783 OnInputEventAck(std::move(ack));
2784 } 2784 }
2785 2785
2786 } // namespace content 2786 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | ipc/ipc_message_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698