OLD | NEW |
---|---|
(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 "remoting/client/callback_cursor_shape_stub.h" | |
6 | |
7 #include "base/bind.h" | |
8 #include "base/location.h" | |
9 #include "remoting/proto/control.pb.h" | |
10 | |
11 namespace remoting { | |
12 | |
13 CallbackCursorShapeStub::CallbackCursorShapeStub( | |
14 base::Callback<void(const protocol::CursorShapeInfo&)> callback, | |
15 scoped_refptr<base::SingleThreadTaskRunner> task_runner) | |
16 : callback_(callback), task_runner_(task_runner) {} | |
17 | |
18 CallbackCursorShapeStub::~CallbackCursorShapeStub() {} | |
19 | |
20 void CallbackCursorShapeStub::SetCursorShape( | |
21 const protocol::CursorShapeInfo& cursor_shape) { | |
22 if (task_runner_) { | |
Sergey Ulanov
2016/07/27 18:26:09
Do you really need to support case when task_runne
Yuwei
2016/07/27 18:37:20
It's not really being used... I'll drop it...
Yuwei
2016/07/27 19:22:27
Done. Removed.
| |
23 task_runner_->PostTask(FROM_HERE, base::Bind(callback_, cursor_shape)); | |
24 } else { | |
25 callback_.Run(cursor_shape); | |
26 } | |
27 } | |
28 | |
29 } // namespace remoting | |
OLD | NEW |