| OLD | NEW |
| 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 <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/cancelable_callback.h" | 10 #include "base/cancelable_callback.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/threading/non_thread_safe.h" |
| 12 #include "cc/scheduler/begin_frame_source.h" | 13 #include "cc/scheduler/begin_frame_source.h" |
| 13 | 14 |
| 14 namespace cc { | 15 namespace cc { |
| 15 | 16 |
| 16 class FakeExternalBeginFrameSource | 17 class FakeExternalBeginFrameSource |
| 17 : public BeginFrameSource, | 18 : public BeginFrameSource, |
| 18 public NON_EXPORTED_BASE(base::NonThreadSafe) { | 19 public NON_EXPORTED_BASE(base::NonThreadSafe) { |
| 19 public: | 20 public: |
| 20 class Client { | 21 class Client { |
| 21 public: | 22 public: |
| (...skipping 27 matching lines...) Expand all Loading... |
| 49 Client* client_ = nullptr; | 50 Client* client_ = nullptr; |
| 50 bool paused_ = false; | 51 bool paused_ = false; |
| 51 std::set<BeginFrameObserver*> observers_; | 52 std::set<BeginFrameObserver*> observers_; |
| 52 base::CancelableCallback<void(const BeginFrameArgs&)> begin_frame_task_; | 53 base::CancelableCallback<void(const BeginFrameArgs&)> begin_frame_task_; |
| 53 base::WeakPtrFactory<FakeExternalBeginFrameSource> weak_ptr_factory_; | 54 base::WeakPtrFactory<FakeExternalBeginFrameSource> weak_ptr_factory_; |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 } // namespace cc | 57 } // namespace cc |
| 57 | 58 |
| 58 #endif // CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_ | 59 #endif // CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_ |
| OLD | NEW |