OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ | 5 #ifndef REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ |
6 #define REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ | 6 #define REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ |
7 | 7 |
8 #include <cstdint> | 8 #include <cstdint> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 15 matching lines...) Expand all Loading... |
26 } // namespace base | 26 } // namespace base |
27 | 27 |
28 namespace remoting { | 28 namespace remoting { |
29 | 29 |
30 namespace protocol { | 30 namespace protocol { |
31 class PairingRegistry; | 31 class PairingRegistry; |
32 } // namespace protocol | 32 } // namespace protocol |
33 | 33 |
34 class ChromotingHostContext; | 34 class ChromotingHostContext; |
35 class ElevatedNativeMessagingHost; | 35 class ElevatedNativeMessagingHost; |
36 class LogMessageHandler; | 36 class LogMessageListener; |
37 | 37 |
38 // Implementation of the me2me native messaging host. | 38 // Implementation of the me2me native messaging host. |
39 class Me2MeNativeMessagingHost : public extensions::NativeMessageHost { | 39 class Me2MeNativeMessagingHost : public extensions::NativeMessageHost { |
40 public: | 40 public: |
41 Me2MeNativeMessagingHost( | 41 Me2MeNativeMessagingHost( |
42 bool needs_elevation, | 42 bool needs_elevation, |
43 intptr_t parent_window_handle, | 43 intptr_t parent_window_handle, |
44 std::unique_ptr<ChromotingHostContext> host_context, | 44 std::unique_ptr<ChromotingHostContext> host_context, |
45 scoped_refptr<DaemonController> daemon_controller, | 45 scoped_refptr<DaemonController> daemon_controller, |
46 scoped_refptr<protocol::PairingRegistry> pairing_registry, | 46 scoped_refptr<protocol::PairingRegistry> pairing_registry, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // Controls the lifetime of the elevated native messaging host process. | 125 // Controls the lifetime of the elevated native messaging host process. |
126 std::unique_ptr<ElevatedNativeMessagingHost> elevated_host_; | 126 std::unique_ptr<ElevatedNativeMessagingHost> elevated_host_; |
127 | 127 |
128 // Handle of the parent window. | 128 // Handle of the parent window. |
129 intptr_t parent_window_handle_; | 129 intptr_t parent_window_handle_; |
130 #endif // defined(OS_WIN) | 130 #endif // defined(OS_WIN) |
131 | 131 |
132 extensions::NativeMessageHost::Client* client_; | 132 extensions::NativeMessageHost::Client* client_; |
133 std::unique_ptr<ChromotingHostContext> host_context_; | 133 std::unique_ptr<ChromotingHostContext> host_context_; |
134 | 134 |
135 std::unique_ptr<LogMessageHandler> log_message_handler_; | 135 std::unique_ptr<LogMessageListener> log_message_listener_; |
136 | 136 |
137 scoped_refptr<DaemonController> daemon_controller_; | 137 scoped_refptr<DaemonController> daemon_controller_; |
138 | 138 |
139 // Used to load and update the paired clients for this host. | 139 // Used to load and update the paired clients for this host. |
140 scoped_refptr<protocol::PairingRegistry> pairing_registry_; | 140 scoped_refptr<protocol::PairingRegistry> pairing_registry_; |
141 | 141 |
142 // Used to exchange the service account authorization code for credentials. | 142 // Used to exchange the service account authorization code for credentials. |
143 std::unique_ptr<OAuthClient> oauth_client_; | 143 std::unique_ptr<OAuthClient> oauth_client_; |
144 | 144 |
145 base::WeakPtr<Me2MeNativeMessagingHost> weak_ptr_; | 145 base::WeakPtr<Me2MeNativeMessagingHost> weak_ptr_; |
146 base::WeakPtrFactory<Me2MeNativeMessagingHost> weak_factory_; | 146 base::WeakPtrFactory<Me2MeNativeMessagingHost> weak_factory_; |
147 | 147 |
148 DISALLOW_COPY_AND_ASSIGN(Me2MeNativeMessagingHost); | 148 DISALLOW_COPY_AND_ASSIGN(Me2MeNativeMessagingHost); |
149 }; | 149 }; |
150 | 150 |
151 } // namespace remoting | 151 } // namespace remoting |
152 | 152 |
153 #endif // REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ | 153 #endif // REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ |
OLD | NEW |