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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1946403003: Add fixed raster scale use counter histograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+fix Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "core/fetch/UniqueIdentifier.h" 52 #include "core/fetch/UniqueIdentifier.h"
53 #include "core/frame/EventHandlerRegistry.h" 53 #include "core/frame/EventHandlerRegistry.h"
54 #include "core/frame/FrameHost.h" 54 #include "core/frame/FrameHost.h"
55 #include "core/frame/FrameView.h" 55 #include "core/frame/FrameView.h"
56 #include "core/frame/LocalFrame.h" 56 #include "core/frame/LocalFrame.h"
57 #include "core/frame/PageScaleConstraintsSet.h" 57 #include "core/frame/PageScaleConstraintsSet.h"
58 #include "core/frame/RemoteFrame.h" 58 #include "core/frame/RemoteFrame.h"
59 #include "core/frame/Settings.h" 59 #include "core/frame/Settings.h"
60 #include "core/frame/SmartClip.h" 60 #include "core/frame/SmartClip.h"
61 #include "core/frame/TopControls.h" 61 #include "core/frame/TopControls.h"
62 #include "core/frame/UseCounter.h"
62 #include "core/frame/VisualViewport.h" 63 #include "core/frame/VisualViewport.h"
63 #include "core/html/HTMLInputElement.h" 64 #include "core/html/HTMLInputElement.h"
64 #include "core/html/HTMLMediaElement.h" 65 #include "core/html/HTMLMediaElement.h"
65 #include "core/html/HTMLPlugInElement.h" 66 #include "core/html/HTMLPlugInElement.h"
66 #include "core/html/HTMLTextAreaElement.h" 67 #include "core/html/HTMLTextAreaElement.h"
67 #include "core/input/EventHandler.h" 68 #include "core/input/EventHandler.h"
68 #include "core/input/TouchActionUtil.h" 69 #include "core/input/TouchActionUtil.h"
69 #include "core/layout/LayoutPart.h" 70 #include "core/layout/LayoutPart.h"
70 #include "core/layout/TextAutosizer.h" 71 #include "core/layout/TextAutosizer.h"
71 #include "core/layout/api/LayoutViewItem.h" 72 #include "core/layout/api/LayoutViewItem.h"
(...skipping 2723 matching lines...) Expand 10 before | Expand all | Expand 10 after
2795 if (page()) 2796 if (page())
2796 page()->pointerLockController().didLosePointerLock(); 2797 page()->pointerLockController().didLosePointerLock();
2797 } 2798 }
2798 2799
2799 void WebViewImpl::didChangeWindowResizerRect() 2800 void WebViewImpl::didChangeWindowResizerRect()
2800 { 2801 {
2801 if (mainFrameImpl()->frameView()) 2802 if (mainFrameImpl()->frameView())
2802 mainFrameImpl()->frameView()->windowResizerRectChanged(); 2803 mainFrameImpl()->frameView()->windowResizerRectChanged();
2803 } 2804 }
2804 2805
2806 void WebViewImpl::reportFixedRasterScaleUseCounters(bool hasBlurryContent, bool hasPotentialPerformanceRegression)
2807 {
2808 if (!mainFrameImpl() || !mainFrameImpl()->frame()->isLocalFrame())
2809 return;
2810 Document* document = mainFrameImpl()->frame()->document();
2811 if (hasBlurryContent)
2812 UseCounter::count(document, UseCounter::FixedRasterScaleBlurryContent);
2813 if (hasPotentialPerformanceRegression)
2814 UseCounter::count(document, UseCounter::FixedRasterScalePotentialPerform anceRegression);
2815 }
2816
2805 // WebView -------------------------------------------------------------------- 2817 // WebView --------------------------------------------------------------------
2806 2818
2807 WebSettingsImpl* WebViewImpl::settingsImpl() 2819 WebSettingsImpl* WebViewImpl::settingsImpl()
2808 { 2820 {
2809 if (!m_webSettings) 2821 if (!m_webSettings)
2810 m_webSettings = adoptPtr(new WebSettingsImpl(&m_page->settings(), m_devT oolsEmulator.get())); 2822 m_webSettings = adoptPtr(new WebSettingsImpl(&m_page->settings(), m_devT oolsEmulator.get()));
2811 DCHECK(m_webSettings); 2823 DCHECK(m_webSettings);
2812 return m_webSettings.get(); 2824 return m_webSettings.get();
2813 } 2825 }
2814 2826
(...skipping 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after
4522 { 4534 {
4523 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4535 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4524 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4536 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4525 if (!page()) 4537 if (!page())
4526 return 1; 4538 return 1;
4527 4539
4528 return page()->deviceScaleFactor(); 4540 return page()->deviceScaleFactor();
4529 } 4541 }
4530 4542
4531 } // namespace blink 4543 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/public/platform/WebLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698