OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 5 #ifndef COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
7 | 7 |
8 #include "base/files/scoped_file.h" | 8 #include "base/files/scoped_file.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
12 #include "components/arc/common/arc_message_types.h" | 12 #include "components/arc/common/arc_message_types.h" |
13 #include "components/arc/common/arc_notification_types.h" | 13 #include "components/arc/common/arc_notification_types.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class CommandLine; | 16 class CommandLine; |
17 class SequencedTaskRunner; | 17 class SequencedTaskRunner; |
18 class SingleThreadTaskRunner; | 18 class SingleThreadTaskRunner; |
19 } // namespace base | 19 } // namespace base |
20 | 20 |
21 namespace arc { | 21 namespace arc { |
22 | 22 |
23 // The Chrome-side service that handles ARC instances and ARC bridge creation. | 23 // The Chrome-side service that handles ARC instances and ARC bridge creation. |
24 // This service handles the lifetime of ARC instances and sets up the | 24 // This service handles the lifetime of ARC instances and sets up the |
25 // communication channel (the ARC bridge) used to send and receive messages. | 25 // communication channel (the ARC bridge) used to send and receive messages. |
26 class ArcBridgeService { | 26 class ArcBridgeService : public base::SupportsWeakPtr<ArcBridgeService> { |
reveman
2015/12/04 03:21:23
why is this needed? I don't see it being used
denniskempin
2015/12/04 22:35:29
You're right, no longer needed.
| |
27 public: | 27 public: |
28 // The possible states of the bridge. In the normal flow, the state changes | 28 // The possible states of the bridge. In the normal flow, the state changes |
29 // in the following sequence: | 29 // in the following sequence: |
30 // | 30 // |
31 // STOPPED | 31 // STOPPED |
32 // SetAvailable(true) + HandleStartup() -> SocketConnect() -> | 32 // SetAvailable(true) + HandleStartup() -> SocketConnect() -> |
33 // CONNECTING | 33 // CONNECTING |
34 // Connect() -> | 34 // Connect() -> |
35 // CONNECTED | 35 // CONNECTED |
36 // SocketConnectAfterSetSocketPermissions() -> | 36 // SocketConnectAfterSetSocketPermissions() -> |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
209 | 209 |
210 // The current state of the bridge. | 210 // The current state of the bridge. |
211 ArcBridgeService::State state_; | 211 ArcBridgeService::State state_; |
212 | 212 |
213 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); | 213 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); |
214 }; | 214 }; |
215 | 215 |
216 } // namespace arc | 216 } // namespace arc |
217 | 217 |
218 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 218 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
OLD | NEW |