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