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 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1496 UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript", | 1496 UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript", |
1497 frame->top() == frame); | 1497 frame->top() == frame); |
1498 | 1498 |
1499 // Logging whether the top frame is remote is sufficient in this case. If | 1499 // Logging whether the top frame is remote is sufficient in this case. If |
1500 // the top frame is local, the printing code will function correctly and | 1500 // the top frame is local, the printing code will function correctly and |
1501 // the frame itself will be printed, so the cases this histogram tracks is | 1501 // the frame itself will be printed, so the cases this histogram tracks is |
1502 // where printing of a subframe will fail as of now. | 1502 // where printing of a subframe will fail as of now. |
1503 UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe", | 1503 UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe", |
1504 frame->top()->isWebRemoteFrame()); | 1504 frame->top()->isWebRemoteFrame()); |
1505 | 1505 |
1506 for (auto& observer : observers_) | 1506 RenderFrameImpl::FromWebFrame(frame)->ScriptedPrint( |
1507 observer.PrintPage(frame, input_handler().handling_input_event()); | 1507 input_handler().handling_input_event()); |
1508 } | 1508 } |
1509 | 1509 |
1510 bool RenderViewImpl::enumerateChosenDirectory( | 1510 bool RenderViewImpl::enumerateChosenDirectory( |
1511 const WebString& path, | 1511 const WebString& path, |
1512 WebFileChooserCompletion* chooser_completion) { | 1512 WebFileChooserCompletion* chooser_completion) { |
1513 int id = enumeration_completion_id_++; | 1513 int id = enumeration_completion_id_++; |
1514 enumeration_completions_[id] = chooser_completion; | 1514 enumeration_completions_[id] = chooser_completion; |
1515 return Send(new ViewHostMsg_EnumerateDirectory( | 1515 return Send(new ViewHostMsg_EnumerateDirectory( |
1516 GetRoutingID(), id, blink::WebStringToFilePath(path))); | 1516 GetRoutingID(), id, blink::WebStringToFilePath(path))); |
1517 } | 1517 } |
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2792 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2792 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
2793 } | 2793 } |
2794 | 2794 |
2795 std::unique_ptr<InputEventAck> ack( | 2795 std::unique_ptr<InputEventAck> ack( |
2796 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, | 2796 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, |
2797 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2797 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
2798 OnInputEventAck(std::move(ack)); | 2798 OnInputEventAck(std::move(ack)); |
2799 } | 2799 } |
2800 | 2800 |
2801 } // namespace content | 2801 } // namespace content |
OLD | NEW |