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

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

Issue 2187723002: [Remoting Android] Refactor CursorShapeStubProxy from JniDisplayHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's Feedback 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
« no previous file with comments | « no previous file | remoting/client/cursor_shape_stub_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CURSOR_SHAPE_STUB_PROXY_H_
6 #define REMOTING_CLIENT_CURSOR_SHAPE_STUB_PROXY_H_
7
8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.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 to forward CursorShapeStub function calls from one thread to
16 // another.
17 class CursorShapeStubProxy : public protocol::CursorShapeStub {
18 public:
19 // Function calls will be forwarded to |stub| on the thread of |task_runner|.
20 CursorShapeStubProxy(
21 base::WeakPtr<protocol::CursorShapeStub> stub,
22 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
23 ~CursorShapeStubProxy() override;
24
25 // CursorShapeStub override.
26 void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override;
27
28 private:
29 base::WeakPtr<protocol::CursorShapeStub> stub_;
30 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
31
32 DISALLOW_COPY_AND_ASSIGN(CursorShapeStubProxy);
33 };
34
35 } // namespace remoting
36
37 #endif // REMOTING_CLIENT_CURSOR_SHAPE_STUB_PROXY_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/cursor_shape_stub_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698