OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PROTOCOL_HOST_EVENT_DISPATCHER_H_ | 5 #ifndef REMOTING_PROTOCOL_HOST_EVENT_DISPATCHER_H_ |
6 #define REMOTING_PROTOCOL_HOST_EVENT_DISPATCHER_H_ | 6 #define REMOTING_PROTOCOL_HOST_EVENT_DISPATCHER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // the dispatcher. | 30 // the dispatcher. |
31 void set_input_stub(InputStub* input_stub) { input_stub_ = input_stub; } | 31 void set_input_stub(InputStub* input_stub) { input_stub_ = input_stub; } |
32 | 32 |
33 // Set callback to notify of each message's sequence number. The | 33 // Set callback to notify of each message's sequence number. The |
34 // callback cannot tear down this object. | 34 // callback cannot tear down this object. |
35 void set_on_input_event_callback(const OnInputEventCallback& value) { | 35 void set_on_input_event_callback(const OnInputEventCallback& value) { |
36 on_input_event_callback_ = value; | 36 on_input_event_callback_ = value; |
37 } | 37 } |
38 | 38 |
39 private: | 39 private: |
40 void OnIncomingMessage(scoped_ptr<CompoundBuffer> buffer) override; | 40 void OnIncomingMessage(std::unique_ptr<CompoundBuffer> buffer) override; |
41 | 41 |
42 InputStub* input_stub_ = nullptr; | 42 InputStub* input_stub_ = nullptr; |
43 OnInputEventCallback on_input_event_callback_; | 43 OnInputEventCallback on_input_event_callback_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(HostEventDispatcher); | 45 DISALLOW_COPY_AND_ASSIGN(HostEventDispatcher); |
46 }; | 46 }; |
47 | 47 |
48 } // namespace protocol | 48 } // namespace protocol |
49 } // namespace remoting | 49 } // namespace remoting |
50 | 50 |
51 #endif // REMOTING_PROTOCOL_HOST_EVENT_DISPATCHER_H_ | 51 #endif // REMOTING_PROTOCOL_HOST_EVENT_DISPATCHER_H_ |
OLD | NEW |