Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(877)

Side by Side Diff: remoting/host/setup/me2me_native_messaging_host.h

Issue 2034393004: Allow multiple logging::LogMessage{Handler,Listener}s Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 19 matching lines...) Expand all
30 } // namespace gaia 30 } // namespace gaia
31 31
32 namespace remoting { 32 namespace remoting {
33 33
34 namespace protocol { 34 namespace protocol {
35 class PairingRegistry; 35 class PairingRegistry;
36 } // namespace protocol 36 } // namespace protocol
37 37
38 class ChromotingHostContext; 38 class ChromotingHostContext;
39 class ElevatedNativeMessagingHost; 39 class ElevatedNativeMessagingHost;
40 class LogMessageHandler; 40 class LogMessageListener;
41 41
42 // Implementation of the me2me native messaging host. 42 // Implementation of the me2me native messaging host.
43 class Me2MeNativeMessagingHost : public extensions::NativeMessageHost { 43 class Me2MeNativeMessagingHost : public extensions::NativeMessageHost {
44 public: 44 public:
45 Me2MeNativeMessagingHost( 45 Me2MeNativeMessagingHost(
46 bool needs_elevation, 46 bool needs_elevation,
47 intptr_t parent_window_handle, 47 intptr_t parent_window_handle,
48 std::unique_ptr<ChromotingHostContext> host_context, 48 std::unique_ptr<ChromotingHostContext> host_context,
49 scoped_refptr<DaemonController> daemon_controller, 49 scoped_refptr<DaemonController> daemon_controller,
50 scoped_refptr<protocol::PairingRegistry> pairing_registry, 50 scoped_refptr<protocol::PairingRegistry> pairing_registry,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Controls the lifetime of the elevated native messaging host process. 129 // Controls the lifetime of the elevated native messaging host process.
130 std::unique_ptr<ElevatedNativeMessagingHost> elevated_host_; 130 std::unique_ptr<ElevatedNativeMessagingHost> elevated_host_;
131 131
132 // Handle of the parent window. 132 // Handle of the parent window.
133 intptr_t parent_window_handle_; 133 intptr_t parent_window_handle_;
134 #endif // defined(OS_WIN) 134 #endif // defined(OS_WIN)
135 135
136 extensions::NativeMessageHost::Client* client_; 136 extensions::NativeMessageHost::Client* client_;
137 std::unique_ptr<ChromotingHostContext> host_context_; 137 std::unique_ptr<ChromotingHostContext> host_context_;
138 138
139 std::unique_ptr<LogMessageHandler> log_message_handler_; 139 std::unique_ptr<LogMessageListener> log_message_listener_;
140 140
141 scoped_refptr<DaemonController> daemon_controller_; 141 scoped_refptr<DaemonController> daemon_controller_;
142 142
143 // Used to load and update the paired clients for this host. 143 // Used to load and update the paired clients for this host.
144 scoped_refptr<protocol::PairingRegistry> pairing_registry_; 144 scoped_refptr<protocol::PairingRegistry> pairing_registry_;
145 145
146 // Used to exchange the service account authorization code for credentials. 146 // Used to exchange the service account authorization code for credentials.
147 std::unique_ptr<OAuthClient> oauth_client_; 147 std::unique_ptr<OAuthClient> oauth_client_;
148 148
149 base::WeakPtr<Me2MeNativeMessagingHost> weak_ptr_; 149 base::WeakPtr<Me2MeNativeMessagingHost> weak_ptr_;
150 base::WeakPtrFactory<Me2MeNativeMessagingHost> weak_factory_; 150 base::WeakPtrFactory<Me2MeNativeMessagingHost> weak_factory_;
151 151
152 DISALLOW_COPY_AND_ASSIGN(Me2MeNativeMessagingHost); 152 DISALLOW_COPY_AND_ASSIGN(Me2MeNativeMessagingHost);
153 }; 153 };
154 154
155 } // namespace remoting 155 } // namespace remoting
156 156
157 #endif // REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ 157 #endif // REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698