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

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

Issue 2426503002: Make printing work better with OOPIF. (Closed)
Patch Set: Fix build, nits 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
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 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript", 1632 UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript",
1633 frame->top() == frame); 1633 frame->top() == frame);
1634 1634
1635 // Logging whether the top frame is remote is sufficient in this case. If 1635 // Logging whether the top frame is remote is sufficient in this case. If
1636 // the top frame is local, the printing code will function correctly and 1636 // the top frame is local, the printing code will function correctly and
1637 // the frame itself will be printed, so the cases this histogram tracks is 1637 // the frame itself will be printed, so the cases this histogram tracks is
1638 // where printing of a subframe will fail as of now. 1638 // where printing of a subframe will fail as of now.
1639 UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe", 1639 UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe",
1640 frame->top()->isWebRemoteFrame()); 1640 frame->top()->isWebRemoteFrame());
1641 1641
1642 for (auto& observer : observers_) 1642 RenderFrameImpl::FromWebFrame(frame)->ScriptedPrint(
1643 observer.PrintPage(frame, input_handler().handling_input_event()); 1643 input_handler().handling_input_event());
1644 } 1644 }
1645 1645
1646 bool RenderViewImpl::enumerateChosenDirectory( 1646 bool RenderViewImpl::enumerateChosenDirectory(
1647 const WebString& path, 1647 const WebString& path,
1648 WebFileChooserCompletion* chooser_completion) { 1648 WebFileChooserCompletion* chooser_completion) {
1649 int id = enumeration_completion_id_++; 1649 int id = enumeration_completion_id_++;
1650 enumeration_completions_[id] = chooser_completion; 1650 enumeration_completions_[id] = chooser_completion;
1651 return Send(new ViewHostMsg_EnumerateDirectory( 1651 return Send(new ViewHostMsg_EnumerateDirectory(
1652 GetRoutingID(), id, blink::WebStringToFilePath(path))); 1652 GetRoutingID(), id, blink::WebStringToFilePath(path)));
1653 } 1653 }
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
3043 NotifyInputEventHandled(input_event->type, 3043 NotifyInputEventHandled(input_event->type,
3044 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 3044 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
3045 } 3045 }
3046 3046
3047 std::unique_ptr<InputEventAck> ack( 3047 std::unique_ptr<InputEventAck> ack(
3048 new InputEventAck(input_event->type, INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 3048 new InputEventAck(input_event->type, INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
3049 OnInputEventAck(std::move(ack)); 3049 OnInputEventAck(std::move(ack));
3050 } 3050 }
3051 3051
3052 } // namespace content 3052 } // namespace content
OLDNEW
« content/browser/frame_host/render_frame_host_impl.h ('K') | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698