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

Side by Side Diff: remoting/client/plugin/empty_cursor_filter.h

Issue 1228333004: Move code that doesn't depend on PPAPI out of remoting/client/plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 2014 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_PLUGIN_EMPTY_CURSOR_FILTER_H_
6 #define REMOTING_CLIENT_PLUGIN_EMPTY_CURSOR_FILTER_H_
7
8 #include "remoting/protocol/cursor_shape_stub.h"
9
10 namespace remoting {
11
12 // Returns an empty cursor.
13 protocol::CursorShapeInfo EmptyCursorShape();
14
15 // Returns true of the supplied cursor is empty, i.e. width and/or height <= 0.
16 bool IsCursorShapeEmpty(const protocol::CursorShapeInfo& cursor_shape);
17
18 // Helper that checks whether a cursor has any visible pixels, and resizes
19 // it down to (0x0) if not.
20 // TODO(wez): Turn this into a general-purpose cropping filter that both
21 // client and host can use.
22 class EmptyCursorFilter : public protocol::CursorShapeStub {
23 public:
24 explicit EmptyCursorFilter(protocol::CursorShapeStub* cursor_stub);
25 ~EmptyCursorFilter() override;
26
27 // protocol::CursorShapeStub interface.
28 void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override;
29
30 // Replaces the stub to which cursor shapes will be passed-on.
31 void set_cursor_stub(protocol::CursorShapeStub* cursor_stub) {
32 cursor_stub_ = cursor_stub;
33 }
34
35 private:
36 protocol::CursorShapeStub* cursor_stub_;
37
38 DISALLOW_COPY_AND_ASSIGN(EmptyCursorFilter);
39 };
40
41 } // namespace remoting
42
43 #endif // REMOTING_CLIENT_PLUGIN_EMPTY_CURSOR_FILTER_H_
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/client/plugin/empty_cursor_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698