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

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
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/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_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/cursor_shape_stub_proxy.cc » ('j') | remoting/client/cursor_shape_stub_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698