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

Side by Side Diff: remoting/client/callback_cursor_shape_stub.cc

Issue 2187723002: [Remoting Android] Refactor CursorShapeStubProxy from JniDisplayHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor style fix Created 4 years, 4 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 "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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698