| 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 CHROME_SERVICE_SERVICE_IPC_SERVER_H_ | 5 #ifndef CHROME_SERVICE_SERVICE_IPC_SERVER_H_ |
| 6 #define CHROME_SERVICE_SERVICE_IPC_SERVER_H_ | 6 #define CHROME_SERVICE_SERVICE_IPC_SERVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/scoped_vector.h" | |
| 15 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 16 #include "ipc/ipc_listener.h" | 15 #include "ipc/ipc_listener.h" |
| 17 #include "ipc/ipc_sender.h" | 16 #include "ipc/ipc_sender.h" |
| 18 #include "ipc/ipc_sync_channel.h" | 17 #include "ipc/ipc_sync_channel.h" |
| 19 #include "mojo/public/cpp/system/message_pipe.h" | 18 #include "mojo/public/cpp/system/message_pipe.h" |
| 20 | 19 |
| 21 namespace base { | 20 namespace base { |
| 22 | 21 |
| 23 class HistogramDeltaSerialization; | 22 class HistogramDeltaSerialization; |
| 24 class WaitableEvent; | 23 class WaitableEvent; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 void OnShutdown(); | 85 void OnShutdown(); |
| 87 void OnUpdateAvailable(); | 86 void OnUpdateAvailable(); |
| 88 | 87 |
| 89 // Helper method to create the sync channel. | 88 // Helper method to create the sync channel. |
| 90 void CreateChannel(); | 89 void CreateChannel(); |
| 91 | 90 |
| 92 Client* client_; | 91 Client* client_; |
| 93 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 92 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
| 94 std::unique_ptr<IPC::SyncChannel> channel_; | 93 std::unique_ptr<IPC::SyncChannel> channel_; |
| 95 base::WaitableEvent* shutdown_event_; | 94 base::WaitableEvent* shutdown_event_; |
| 96 ScopedVector<MessageHandler> message_handlers_; | 95 std::vector<std::unique_ptr<MessageHandler>> message_handlers_; |
| 97 | 96 |
| 98 // Indicates whether an IPC client is currently connected to the channel. | 97 // Indicates whether an IPC client is currently connected to the channel. |
| 99 bool ipc_client_connected_ = false; | 98 bool ipc_client_connected_ = false; |
| 100 | 99 |
| 101 // Calculates histograms deltas. | 100 // Calculates histograms deltas. |
| 102 std::unique_ptr<base::HistogramDeltaSerialization> | 101 std::unique_ptr<base::HistogramDeltaSerialization> |
| 103 histogram_delta_serializer_; | 102 histogram_delta_serializer_; |
| 104 | 103 |
| 105 DISALLOW_COPY_AND_ASSIGN(ServiceIPCServer); | 104 DISALLOW_COPY_AND_ASSIGN(ServiceIPCServer); |
| 106 }; | 105 }; |
| 107 | 106 |
| 108 #endif // CHROME_SERVICE_SERVICE_IPC_SERVER_H_ | 107 #endif // CHROME_SERVICE_SERVICE_IPC_SERVER_H_ |
| OLD | NEW |