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

Side by Side Diff: content/renderer/gpu/render_widget_compositor_unittest.cc

Issue 2737653004: UMA metrics for use count of wheel and touch scrolls. (Closed)
Patch Set: boolean flags used instead of fieldbit Created 3 years, 9 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 24 matching lines...) Expand all
35 35
36 class StubRenderWidgetCompositorDelegate 36 class StubRenderWidgetCompositorDelegate
37 : public RenderWidgetCompositorDelegate { 37 : public RenderWidgetCompositorDelegate {
38 public: 38 public:
39 // RenderWidgetCompositorDelegate implementation. 39 // RenderWidgetCompositorDelegate implementation.
40 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, 40 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta,
41 const gfx::Vector2dF& outer_delta, 41 const gfx::Vector2dF& outer_delta,
42 const gfx::Vector2dF& elastic_overscroll_delta, 42 const gfx::Vector2dF& elastic_overscroll_delta,
43 float page_scale, 43 float page_scale,
44 float top_controls_delta) override {} 44 float top_controls_delta) override {}
45 void RecordWheelAndTouchScrollingCount(bool has_scrolled_by_wheel,
46 bool has_scrolled_by_touch) override {}
45 void BeginMainFrame(double frame_time_sec) override {} 47 void BeginMainFrame(double frame_time_sec) override {}
46 std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink( 48 std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink(
47 const cc::FrameSinkId& frame_sink_id, 49 const cc::FrameSinkId& frame_sink_id,
48 bool fallback) override { 50 bool fallback) override {
49 return nullptr; 51 return nullptr;
50 } 52 }
51 void DidCommitAndDrawCompositorFrame() override {} 53 void DidCommitAndDrawCompositorFrame() override {}
52 void DidCommitCompositorFrame() override {} 54 void DidCommitCompositorFrame() override {}
53 void DidCompletePageScaleAnimation() override {} 55 void DidCompletePageScaleAnimation() override {}
54 void DidReceiveCompositorFrameAck() override {} 56 void DidReceiveCompositorFrameAck() override {}
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 303
302 TEST_F(RenderWidgetCompositorFrameSinkTest, FallbackSuccessNormalSuccess) { 304 TEST_F(RenderWidgetCompositorFrameSinkTest, FallbackSuccessNormalSuccess) {
303 // The first success is a fallback, but the next should not be a fallback. 305 // The first success is a fallback, but the next should not be a fallback.
304 RunTest(false, 306 RunTest(false,
305 RenderWidgetCompositor::COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK, 307 RenderWidgetCompositor::COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK,
306 1, 1); 308 1, 1);
307 } 309 }
308 310
309 } // namespace 311 } // namespace
310 } // namespace content 312 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698