| OLD | NEW |
| 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 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript", | 1628 UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript", |
| 1629 frame->top() == frame); | 1629 frame->top() == frame); |
| 1630 | 1630 |
| 1631 // Logging whether the top frame is remote is sufficient in this case. If | 1631 // Logging whether the top frame is remote is sufficient in this case. If |
| 1632 // the top frame is local, the printing code will function correctly and | 1632 // the top frame is local, the printing code will function correctly and |
| 1633 // the frame itself will be printed, so the cases this histogram tracks is | 1633 // the frame itself will be printed, so the cases this histogram tracks is |
| 1634 // where printing of a subframe will fail as of now. | 1634 // where printing of a subframe will fail as of now. |
| 1635 UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe", | 1635 UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe", |
| 1636 frame->top()->isWebRemoteFrame()); | 1636 frame->top()->isWebRemoteFrame()); |
| 1637 | 1637 |
| 1638 for (auto& observer : observers_) | 1638 RenderFrameImpl::FromWebFrame(frame)->ScriptedPrint( |
| 1639 observer.PrintPage(frame, input_handler().handling_input_event()); | 1639 input_handler().handling_input_event()); |
| 1640 } | 1640 } |
| 1641 | 1641 |
| 1642 bool RenderViewImpl::enumerateChosenDirectory( | 1642 bool RenderViewImpl::enumerateChosenDirectory( |
| 1643 const WebString& path, | 1643 const WebString& path, |
| 1644 WebFileChooserCompletion* chooser_completion) { | 1644 WebFileChooserCompletion* chooser_completion) { |
| 1645 int id = enumeration_completion_id_++; | 1645 int id = enumeration_completion_id_++; |
| 1646 enumeration_completions_[id] = chooser_completion; | 1646 enumeration_completions_[id] = chooser_completion; |
| 1647 return Send(new ViewHostMsg_EnumerateDirectory( | 1647 return Send(new ViewHostMsg_EnumerateDirectory( |
| 1648 GetRoutingID(), id, blink::WebStringToFilePath(path))); | 1648 GetRoutingID(), id, blink::WebStringToFilePath(path))); |
| 1649 } | 1649 } |
| (...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2970 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2970 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 2971 } | 2971 } |
| 2972 | 2972 |
| 2973 std::unique_ptr<InputEventAck> ack( | 2973 std::unique_ptr<InputEventAck> ack( |
| 2974 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, | 2974 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, |
| 2975 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2975 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
| 2976 OnInputEventAck(std::move(ack)); | 2976 OnInputEventAck(std::move(ack)); |
| 2977 } | 2977 } |
| 2978 | 2978 |
| 2979 } // namespace content | 2979 } // namespace content |
| OLD | NEW |