Chromium Code Reviews| 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 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1624 } | 1624 } |
| 1625 return widget->GetWebWidget(); | 1625 return widget->GetWebWidget(); |
| 1626 } | 1626 } |
| 1627 | 1627 |
| 1628 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() { | 1628 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() { |
| 1629 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); | 1629 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); |
| 1630 return new WebStorageNamespaceImpl(session_storage_namespace_id_); | 1630 return new WebStorageNamespaceImpl(session_storage_namespace_id_); |
| 1631 } | 1631 } |
| 1632 | 1632 |
| 1633 void RenderViewImpl::printPage(WebLocalFrame* frame) { | 1633 void RenderViewImpl::printPage(WebLocalFrame* frame) { |
| 1634 UMA_HISTOGRAM_BOOLEAN("Printing.InitiatedByScript", frame->top() == frame); | |
| 1635 | |
| 1636 // Logging whether the top frame is remote is sufficient in this case. If | |
| 1637 // the top frame is local, the printing code will function correctly and | |
| 1638 // the frame itself will be printed, so the cases this histogram tracks is | |
| 1639 // where printing of a subframe will fail as of now. | |
| 1640 UMA_HISTOGRAM_BOOLEAN("Printing.OutOfProcessSubframe", | |
| 1641 frame->top()->isWebRemoteFrame()); | |
|
Lei Zhang
2016/10/11 23:42:59
frame->top() won't ever be a nullptr, right?
nasko
2016/10/11 23:44:17
Yes, it should never be null, but can be either lo
Lei Zhang
2016/10/11 23:51:14
Acknowledged.
| |
| 1642 | |
| 1634 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 1643 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| 1635 PrintPage(frame, input_handler().handling_input_event())); | 1644 PrintPage(frame, input_handler().handling_input_event())); |
| 1636 } | 1645 } |
| 1637 | 1646 |
| 1638 bool RenderViewImpl::enumerateChosenDirectory( | 1647 bool RenderViewImpl::enumerateChosenDirectory( |
| 1639 const WebString& path, | 1648 const WebString& path, |
| 1640 WebFileChooserCompletion* chooser_completion) { | 1649 WebFileChooserCompletion* chooser_completion) { |
| 1641 int id = enumeration_completion_id_++; | 1650 int id = enumeration_completion_id_++; |
| 1642 enumeration_completions_[id] = chooser_completion; | 1651 enumeration_completions_[id] = chooser_completion; |
| 1643 return Send(new ViewHostMsg_EnumerateDirectory( | 1652 return Send(new ViewHostMsg_EnumerateDirectory( |
| (...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3024 if (IsUseZoomForDSFEnabled()) { | 3033 if (IsUseZoomForDSFEnabled()) { |
| 3025 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3034 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3026 } else { | 3035 } else { |
| 3027 webview()->setDeviceScaleFactor(device_scale_factor_); | 3036 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3028 } | 3037 } |
| 3029 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3038 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3030 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3039 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3031 } | 3040 } |
| 3032 | 3041 |
| 3033 } // namespace content | 3042 } // namespace content |
| OLD | NEW |