| OLD | NEW |
| 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 EXTENSIONS_BROWSER_API_SERIAL_SERIAL_EVENT_DISPATCHER_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_SERIAL_SERIAL_EVENT_DISPATCHER_H_ |
| 6 #define EXTENSIONS_BROWSER_API_SERIAL_SERIAL_EVENT_DISPATCHER_H_ | 6 #define EXTENSIONS_BROWSER_API_SERIAL_SERIAL_EVENT_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 int connection_id; | 58 int connection_id; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 static void StartReceive(const ReceiveParams& params); | 61 static void StartReceive(const ReceiveParams& params); |
| 62 | 62 |
| 63 static void ReceiveCallback(const ReceiveParams& params, | 63 static void ReceiveCallback(const ReceiveParams& params, |
| 64 const std::vector<char>& data, | 64 const std::vector<char>& data, |
| 65 serial::ReceiveError error); | 65 serial::ReceiveError error); |
| 66 | 66 |
| 67 static void PostEvent(const ReceiveParams& params, | 67 static void PostEvent(const ReceiveParams& params, |
| 68 scoped_ptr<extensions::Event> event); | 68 std::unique_ptr<extensions::Event> event); |
| 69 | 69 |
| 70 static void DispatchEvent(void* browser_context_id, | 70 static void DispatchEvent(void* browser_context_id, |
| 71 const std::string& extension_id, | 71 const std::string& extension_id, |
| 72 scoped_ptr<extensions::Event> event); | 72 std::unique_ptr<extensions::Event> event); |
| 73 | 73 |
| 74 content::BrowserThread::ID thread_id_; | 74 content::BrowserThread::ID thread_id_; |
| 75 content::BrowserContext* const context_; | 75 content::BrowserContext* const context_; |
| 76 scoped_refptr<ConnectionData> connections_; | 76 scoped_refptr<ConnectionData> connections_; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace api | 79 } // namespace api |
| 80 | 80 |
| 81 } // namespace extensions | 81 } // namespace extensions |
| 82 | 82 |
| 83 #endif // EXTENSIONS_BROWSER_API_SERIAL_SERIAL_EVENT_DISPATCHER_H_ | 83 #endif // EXTENSIONS_BROWSER_API_SERIAL_SERIAL_EVENT_DISPATCHER_H_ |
| OLD | NEW |