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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_MOUSE_LOCKER_H_ 5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_MOUSE_LOCKER_H_
6 #define REMOTING_CLIENT_PLUGIN_PEPPER_MOUSE_LOCKER_H_ 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_MOUSE_LOCKER_H_
7 7
8 #include <memory>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "ppapi/cpp/mouse_lock.h" 12 #include "ppapi/cpp/mouse_lock.h"
12 #include "ppapi/utility/completion_callback_factory.h" 13 #include "ppapi/utility/completion_callback_factory.h"
13 #include "remoting/protocol/cursor_shape_stub.h" 14 #include "remoting/protocol/cursor_shape_stub.h"
14 15
15 namespace pp { 16 namespace pp {
16 class Instance; 17 class Instance;
17 } // namespace pp 18 } // namespace pp
18 19
19 namespace remoting { 20 namespace remoting {
20 21
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // the lock is gone. 61 // the lock is gone.
61 void CancelMouseLock(); 62 void CancelMouseLock();
62 63
63 // Callback used to enable/disable delta motion fields in mouse events. 64 // Callback used to enable/disable delta motion fields in mouse events.
64 base::Callback<void(bool)> enable_mouse_deltas_; 65 base::Callback<void(bool)> enable_mouse_deltas_;
65 66
66 // Stub used to set the cursor that will actually be displayed. 67 // Stub used to set the cursor that will actually be displayed.
67 protocol::CursorShapeStub* cursor_stub_; 68 protocol::CursorShapeStub* cursor_stub_;
68 69
69 // Copy of the most-recently-set cursor, to set when mouse-lock is cancelled. 70 // Copy of the most-recently-set cursor, to set when mouse-lock is cancelled.
70 scoped_ptr<protocol::CursorShapeInfo> cursor_shape_; 71 std::unique_ptr<protocol::CursorShapeInfo> cursor_shape_;
71 72
72 // Used to create PPAPI callbacks that will be abandoned when |this| is 73 // Used to create PPAPI callbacks that will be abandoned when |this| is
73 // deleted. 74 // deleted.
74 pp::CompletionCallbackFactory<PepperMouseLocker> callback_factory_; 75 pp::CompletionCallbackFactory<PepperMouseLocker> callback_factory_;
75 76
76 // True if the plugin has focus. 77 // True if the plugin has focus.
77 bool has_focus_; 78 bool has_focus_;
78 79
79 // Holds the current mouse lock state. 80 // Holds the current mouse lock state.
80 MouseLockState mouse_lock_state_; 81 MouseLockState mouse_lock_state_;
81 82
82 DISALLOW_COPY_AND_ASSIGN(PepperMouseLocker); 83 DISALLOW_COPY_AND_ASSIGN(PepperMouseLocker);
83 }; 84 };
84 85
85 } // namespace remoting 86 } // namespace remoting
86 87
87 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_MOUSE_LOCKER_H_ 88 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_MOUSE_LOCKER_H_
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_input_handler.h ('k') | remoting/client/plugin/pepper_packet_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698