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

Side by Side Diff: cc/test/fake_compositor_proto_state_sink.cc

Issue 2362073002: cc/blimp: Add a LayerTreeHostRemote implementation. (Closed)
Patch Set: source frame number Created 4 years, 2 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cc/test/fake_compositor_proto_state_sink.h"
6
7 #include "base/bind.h"
8 #include "base/logging.h"
9 #include "cc/blimp/compositor_proto_state_sink_client.h"
10
11 namespace cc {
12
13 FakeCompositorProtoStateSink::FakeCompositorProtoStateSink()
14 : client_(nullptr), weak_factory_(this) {}
15
16 FakeCompositorProtoStateSink::~FakeCompositorProtoStateSink() {}
17
18 void FakeCompositorProtoStateSink::BindToClient(
19 CompositorProtoStateSinkClient* client) {
20 DCHECK(!client_);
21 client_ = client;
22 }
23
24 void FakeCompositorProtoStateSink::ScheduleMainFrame() {
25 client_->GetMainTaskRunner()->PostTask(
26 FROM_HERE, base::Bind(&FakeCompositorProtoStateSink::BeginMainFrame,
27 weak_factory_.GetWeakPtr()));
28 }
29
30 void FakeCompositorProtoStateSink::BeginMainFrame() {
31 client_->BeginMainFrame();
32 }
33
34 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698