Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2412753002: Add UMA for documents calling window.print(). (Closed)
Patch Set: Improve description. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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("PrintPreview.InitiatedByScript",
1635 frame->top() == frame);
1636
1637 // Logging whether the top frame is remote is sufficient in this case. If
1638 // the top frame is local, the printing code will function correctly and
1639 // the frame itself will be printed, so the cases this histogram tracks is
1640 // where printing of a subframe will fail as of now.
1641 UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe",
1642 frame->top()->isWebRemoteFrame());
1643
1634 FOR_EACH_OBSERVER(RenderViewObserver, observers_, 1644 FOR_EACH_OBSERVER(RenderViewObserver, observers_,
1635 PrintPage(frame, input_handler().handling_input_event())); 1645 PrintPage(frame, input_handler().handling_input_event()));
1636 } 1646 }
1637 1647
1638 bool RenderViewImpl::enumerateChosenDirectory( 1648 bool RenderViewImpl::enumerateChosenDirectory(
1639 const WebString& path, 1649 const WebString& path,
1640 WebFileChooserCompletion* chooser_completion) { 1650 WebFileChooserCompletion* chooser_completion) {
1641 int id = enumeration_completion_id_++; 1651 int id = enumeration_completion_id_++;
1642 enumeration_completions_[id] = chooser_completion; 1652 enumeration_completions_[id] = chooser_completion;
1643 return Send(new ViewHostMsg_EnumerateDirectory( 1653 return Send(new ViewHostMsg_EnumerateDirectory(
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
3024 if (IsUseZoomForDSFEnabled()) { 3034 if (IsUseZoomForDSFEnabled()) {
3025 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); 3035 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_);
3026 } else { 3036 } else {
3027 webview()->setDeviceScaleFactor(device_scale_factor_); 3037 webview()->setDeviceScaleFactor(device_scale_factor_);
3028 } 3038 }
3029 webview()->settings()->setPreferCompositingToLCDTextEnabled( 3039 webview()->settings()->setPreferCompositingToLCDTextEnabled(
3030 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 3040 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
3031 } 3041 }
3032 3042
3033 } // namespace content 3043 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698