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

Unified Diff: cc/test/fake_external_begin_frame_source.cc

Issue 1535833002: Delete CC. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-5
Patch Set: rebase Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/fake_external_begin_frame_source.h ('k') | cc/test/fake_output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_external_begin_frame_source.cc
diff --git a/cc/test/fake_external_begin_frame_source.cc b/cc/test/fake_external_begin_frame_source.cc
deleted file mode 100644
index c1885c143429dafe1bc1a5ac7666e2d7aba77ab9..0000000000000000000000000000000000000000
--- a/cc/test/fake_external_begin_frame_source.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/test/fake_external_begin_frame_source.h"
-
-#include "base/location.h"
-#include "base/message_loop/message_loop.h"
-#include "base/time/time.h"
-#include "cc/test/begin_frame_args_test.h"
-
-namespace cc {
-
-FakeExternalBeginFrameSource::FakeExternalBeginFrameSource(double refresh_rate)
- : milliseconds_per_frame_(1000.0 / refresh_rate),
- is_ready_(false),
- weak_ptr_factory_(this) {
- DetachFromThread();
-}
-
-FakeExternalBeginFrameSource::~FakeExternalBeginFrameSource() {
- DCHECK(CalledOnValidThread());
-}
-
-void FakeExternalBeginFrameSource::SetClientReady() {
- DCHECK(CalledOnValidThread());
- is_ready_ = true;
-}
-
-void FakeExternalBeginFrameSource::OnNeedsBeginFramesChange(
- bool needs_begin_frames) {
- DCHECK(CalledOnValidThread());
- if (needs_begin_frames) {
- PostTestOnBeginFrame();
- }
-}
-
-void FakeExternalBeginFrameSource::TestOnBeginFrame() {
- DCHECK(CalledOnValidThread());
- CallOnBeginFrame(CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE));
-
- if (NeedsBeginFrames()) {
- PostTestOnBeginFrame();
- }
-}
-
-void FakeExternalBeginFrameSource::PostTestOnBeginFrame() {
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE, base::Bind(&FakeExternalBeginFrameSource::TestOnBeginFrame,
- weak_ptr_factory_.GetWeakPtr()),
- base::TimeDelta::FromMilliseconds(milliseconds_per_frame_));
-}
-
-} // namespace cc
« no previous file with comments | « cc/test/fake_external_begin_frame_source.h ('k') | cc/test/fake_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698