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

Side by Side Diff: cc/test/fake_external_begin_frame_source.h

Issue 1136123009: Remove "mixin" from BeginFrameSource/Observer base classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated comments Created 5 years, 6 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 | « cc/surfaces/display_scheduler.cc ('k') | cc/test/scheduler_test_common.h » ('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 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 #ifndef CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_ 5 #ifndef CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_
6 #define CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_ 6 #define CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "cc/scheduler/begin_frame_source.h" 9 #include "cc/scheduler/begin_frame_source.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 class FakeExternalBeginFrameSource 13 class FakeExternalBeginFrameSource
14 : public BeginFrameSourceMixIn, 14 : public BeginFrameSourceBase,
15 public NON_EXPORTED_BASE(base::NonThreadSafe) { 15 public NON_EXPORTED_BASE(base::NonThreadSafe) {
16 public: 16 public:
17 explicit FakeExternalBeginFrameSource(double refresh_rate); 17 explicit FakeExternalBeginFrameSource(double refresh_rate);
18 ~FakeExternalBeginFrameSource() override; 18 ~FakeExternalBeginFrameSource() override;
19 19
20 bool is_ready() const { return is_ready_; } 20 bool is_ready() const { return is_ready_; }
21 21
22 // BeginFrameSource implementation. 22 // BeginFrameSource implementation.
23 void SetClientReady() override; 23 void SetClientReady() override;
24 24
25 // BeginFrameSourceMixIn overrides. 25 // BeginFrameSourceBase overrides.
26 void OnNeedsBeginFramesChange(bool needs_begin_frames) override; 26 void OnNeedsBeginFramesChange(bool needs_begin_frames) override;
27 27
28 void TestOnBeginFrame(); 28 void TestOnBeginFrame();
29 void PostTestOnBeginFrame(); 29 void PostTestOnBeginFrame();
30 30
31 private: 31 private:
32 double milliseconds_per_frame_; 32 double milliseconds_per_frame_;
33 bool is_ready_; 33 bool is_ready_;
34 base::WeakPtrFactory<FakeExternalBeginFrameSource> weak_ptr_factory_; 34 base::WeakPtrFactory<FakeExternalBeginFrameSource> weak_ptr_factory_;
35 }; 35 };
36 36
37 } // namespace cc 37 } // namespace cc
38 38
39 #endif // CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_ 39 #endif // CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/surfaces/display_scheduler.cc ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698