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 #ifndef REMOTING_CLIENT_CURSOR_SHAPE_STUB_PROXY_H_ | |
6 #define REMOTING_CLIENT_CURSOR_SHAPE_STUB_PROXY_H_ | |
7 | |
8 #include "base/callback.h" | |
Sergey Ulanov
2016/07/27 20:38:01
don't need this anymore
Yuwei
2016/07/27 21:01:36
Done.
| |
9 #include "base/macros.h" | |
10 #include "base/memory/weak_ptr.h" | |
11 #include "base/single_thread_task_runner.h" | |
12 #include "remoting/protocol/cursor_shape_stub.h" | |
13 | |
14 namespace remoting { | |
15 | |
16 // A helper class to forward CursorShapeStub function calls from one thread to | |
17 // the thread that the underlying CursorShapeStub lives. | |
Sergey Ulanov
2016/07/27 20:38:01
Suggest rewording
s/the thread that the underlying
Yuwei
2016/07/27 21:01:36
Done.
| |
18 class CursorShapeStubProxy : public protocol::CursorShapeStub { | |
19 public: | |
20 // Function calls will be forwarded to |stub| on the thread of |task_runner|. | |
21 CursorShapeStubProxy( | |
22 base::WeakPtr<protocol::CursorShapeStub> stub, | |
23 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | |
24 ~CursorShapeStubProxy() override; | |
25 | |
26 // CursorShapeStub override. | |
27 void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override; | |
28 | |
29 private: | |
30 base::WeakPtr<protocol::CursorShapeStub> stub_; | |
31 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | |
32 | |
33 DISALLOW_COPY_AND_ASSIGN(CursorShapeStubProxy); | |
34 }; | |
35 | |
36 } // namespace remoting | |
37 | |
38 #endif // REMOTING_CLIENT_CURSOR_SHAPE_STUB_PROXY_H_ | |
OLD | NEW |