| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 9 * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. |
| 10 * | 10 * |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 if (isMetaViewportType()) { | 94 if (isMetaViewportType()) { |
| 95 if (maxWidth.type() == blink::Fixed) { | 95 if (maxWidth.type() == blink::Fixed) { |
| 96 Platform::current()->histogramEnumeration("Viewport.MetaTagType", Co
nstantWidth, TypeCount); | 96 Platform::current()->histogramEnumeration("Viewport.MetaTagType", Co
nstantWidth, TypeCount); |
| 97 | 97 |
| 98 if (mainFrame->view()) { | 98 if (mainFrame->view()) { |
| 99 // To get an idea of how "far" the viewport is from the device's
ideal width, we | 99 // To get an idea of how "far" the viewport is from the device's
ideal width, we |
| 100 // report the zoom level that we'd need to be at for the entire
page to be visible. | 100 // report the zoom level that we'd need to be at for the entire
page to be visible. |
| 101 int viewportWidth = maxWidth.intValue(); | 101 int viewportWidth = maxWidth.intValue(); |
| 102 int windowWidth = mainFrame->document()->settings()->pinchVirtua
lViewportEnabled() | 102 int windowWidth = mainFrame->view()->frameRect().width(); |
| 103 ? mainFrame->host()->pinchViewport().size().width() | |
| 104 : mainFrame->view()->frameRect().width(); | |
| 105 int overviewZoomPercent = 100 * windowWidth / static_cast<float>
(viewportWidth); | 103 int overviewZoomPercent = 100 * windowWidth / static_cast<float>
(viewportWidth); |
| 106 Platform::current()->histogramSparse("Viewport.OverviewZoom", ov
erviewZoomPercent); | 104 Platform::current()->histogramSparse("Viewport.OverviewZoom", ov
erviewZoomPercent); |
| 107 } | 105 } |
| 108 | 106 |
| 109 } else if (maxWidth.type() == blink::DeviceWidth || maxWidth.type() == b
link::ExtendToZoom) { | 107 } else if (maxWidth.type() == blink::DeviceWidth || maxWidth.type() == b
link::ExtendToZoom) { |
| 110 Platform::current()->histogramEnumeration("Viewport.MetaTagType", De
viceWidth, TypeCount); | 108 Platform::current()->histogramEnumeration("Viewport.MetaTagType", De
viceWidth, TypeCount); |
| 111 } else { | 109 } else { |
| 112 // Overflow bucket for cases we may be unaware of. | 110 // Overflow bucket for cases we may be unaware of. |
| 113 Platform::current()->histogramEnumeration("Viewport.MetaTagType", Me
taWidthOther, TypeCount); | 111 Platform::current()->histogramEnumeration("Viewport.MetaTagType", Me
taWidthOther, TypeCount); |
| 114 } | 112 } |
| 115 } else if (type == ViewportDescription::HandheldFriendlyMeta) { | 113 } else if (type == ViewportDescription::HandheldFriendlyMeta) { |
| 116 Platform::current()->histogramEnumeration("Viewport.MetaTagType", MetaHa
ndheldFriendly, TypeCount); | 114 Platform::current()->histogramEnumeration("Viewport.MetaTagType", MetaHa
ndheldFriendly, TypeCount); |
| 117 } else if (type == ViewportDescription::MobileOptimizedMeta) { | 115 } else if (type == ViewportDescription::MobileOptimizedMeta) { |
| 118 Platform::current()->histogramEnumeration("Viewport.MetaTagType", Mobile
OptimizedMeta, TypeCount); | 116 Platform::current()->histogramEnumeration("Viewport.MetaTagType", Mobile
OptimizedMeta, TypeCount); |
| 119 } | 117 } |
| 120 #endif | 118 #endif |
| 121 } | 119 } |
| 122 | 120 |
| 123 } // namespace blink | 121 } // namespace blink |
| OLD | NEW |