| 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 } | 1619 } |
| 1620 return widget->GetWebWidget(); | 1620 return widget->GetWebWidget(); |
| 1621 } | 1621 } |
| 1622 | 1622 |
| 1623 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() { | 1623 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() { |
| 1624 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); | 1624 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); |
| 1625 return new WebStorageNamespaceImpl(session_storage_namespace_id_); | 1625 return new WebStorageNamespaceImpl(session_storage_namespace_id_); |
| 1626 } | 1626 } |
| 1627 | 1627 |
| 1628 void RenderViewImpl::printPage(WebLocalFrame* frame) { | 1628 void RenderViewImpl::printPage(WebLocalFrame* frame) { |
| 1629 UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript", |
| 1630 frame->top() == frame); |
| 1631 |
| 1632 // Logging whether the top frame is remote is sufficient in this case. If |
| 1633 // the top frame is local, the printing code will function correctly and |
| 1634 // the frame itself will be printed, so the cases this histogram tracks is |
| 1635 // where printing of a subframe will fail as of now. |
| 1636 UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe", |
| 1637 frame->top()->isWebRemoteFrame()); |
| 1638 |
| 1629 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 1639 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| 1630 PrintPage(frame, input_handler().handling_input_event())); | 1640 PrintPage(frame, input_handler().handling_input_event())); |
| 1631 } | 1641 } |
| 1632 | 1642 |
| 1633 bool RenderViewImpl::enumerateChosenDirectory( | 1643 bool RenderViewImpl::enumerateChosenDirectory( |
| 1634 const WebString& path, | 1644 const WebString& path, |
| 1635 WebFileChooserCompletion* chooser_completion) { | 1645 WebFileChooserCompletion* chooser_completion) { |
| 1636 int id = enumeration_completion_id_++; | 1646 int id = enumeration_completion_id_++; |
| 1637 enumeration_completions_[id] = chooser_completion; | 1647 enumeration_completions_[id] = chooser_completion; |
| 1638 return Send(new ViewHostMsg_EnumerateDirectory( | 1648 return Send(new ViewHostMsg_EnumerateDirectory( |
| (...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3019 if (IsUseZoomForDSFEnabled()) { | 3029 if (IsUseZoomForDSFEnabled()) { |
| 3020 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3030 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3021 } else { | 3031 } else { |
| 3022 webview()->setDeviceScaleFactor(device_scale_factor_); | 3032 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3023 } | 3033 } |
| 3024 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3034 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3025 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3035 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3026 } | 3036 } |
| 3027 | 3037 |
| 3028 } // namespace content | 3038 } // namespace content |
| OLD | NEW |