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

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

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 #ifndef REMOTING_CLIENT_CALLBACK_CURSOR_SHAPE_STUB_H_
6 #define REMOTING_CLIENT_CALLBACK_CURSOR_SHAPE_STUB_H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "base/single_thread_task_runner.h"
11 #include "remoting/protocol/cursor_shape_stub.h"
12
13 namespace remoting {
14
15 // A helper class for wrapping a cursor updating callback into a
16 // CursorShapeStub. The callback will be run when SetCursorShape is called.
Sergey Ulanov 2016/07/27 18:26:09 The comment doesn't mention that the callback is c
Yuwei 2016/07/27 19:22:28 Added comment.
17 class CallbackCursorShapeStub : public protocol::CursorShapeStub {
Sergey Ulanov 2016/07/27 18:26:09 In other places we call classes like this that mov
Yuwei 2016/07/27 18:37:20 The class being proxied will need to implement the
Sergey Ulanov 2016/07/27 18:47:51 There is no requirement that CursorShapeStub _inte
Yuwei 2016/07/27 19:22:28 Done.
Yuwei 2016/07/27 19:22:28 Acknowledged.
18 public:
19 // If |task_runner| is null, |callback| will be run upon the current call
20 // stack of SetCursorShape on the network thread. Otherwise it will be run
21 // on the thread of |task_runner|.
22 CallbackCursorShapeStub(
23 base::Callback<void(const protocol::CursorShapeInfo&)> callback,
24 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
25 ~CallbackCursorShapeStub() override;
26
27 // CursorShapeStub override.
28 void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override;
29
30 private:
31 base::Callback<void(const protocol::CursorShapeInfo&)> callback_;
32 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
33
34 DISALLOW_COPY_AND_ASSIGN(CallbackCursorShapeStub);
35 };
36
37 } // namespace remoting
38
39 #endif // REMOTING_CLIENT_CALLBACK_CURSOR_SHAPE_STUB_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/callback_cursor_shape_stub.cc » ('j') | remoting/client/callback_cursor_shape_stub.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698