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

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

Issue 2034393004: Allow multiple logging::LogMessage{Handler,Listener}s Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 3 years, 11 months 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 #include "remoting/host/setup/me2me_native_messaging_host.h" 5 #include "remoting/host/setup/me2me_native_messaging_host.h"
6 6
7 #include <cstdint> 7 #include <cstdint>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 ProcessGetCredentialsFromAuthCode( 154 ProcessGetCredentialsFromAuthCode(
155 std::move(message_dict), std::move(response), false); 155 std::move(message_dict), std::move(response), false);
156 } else { 156 } else {
157 OnError("Unsupported request type: " + type); 157 OnError("Unsupported request type: " + type);
158 } 158 }
159 } 159 }
160 160
161 void Me2MeNativeMessagingHost::Start(Client* client) { 161 void Me2MeNativeMessagingHost::Start(Client* client) {
162 DCHECK(task_runner()->BelongsToCurrentThread()); 162 DCHECK(task_runner()->BelongsToCurrentThread());
163 client_ = client; 163 client_ = client;
164 log_message_handler_.reset(new LogMessageHandler( 164 log_message_listener_.reset(new LogMessageListener(
165 base::Bind(&Me2MeNativeMessagingHost::SendMessageToClient, weak_ptr_))); 165 base::Bind(&Me2MeNativeMessagingHost::SendMessageToClient, weak_ptr_)));
166 } 166 }
167 167
168 scoped_refptr<base::SingleThreadTaskRunner> 168 scoped_refptr<base::SingleThreadTaskRunner>
169 Me2MeNativeMessagingHost::task_runner() const { 169 Me2MeNativeMessagingHost::task_runner() const {
170 return host_context_->ui_task_runner(); 170 return host_context_->ui_task_runner();
171 } 171 }
172 172
173 void Me2MeNativeMessagingHost::ProcessHello( 173 void Me2MeNativeMessagingHost::ProcessHello(
174 std::unique_ptr<base::DictionaryValue> message, 174 std::unique_ptr<base::DictionaryValue> message,
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 570
571 bool Me2MeNativeMessagingHost::DelegateToElevatedHost( 571 bool Me2MeNativeMessagingHost::DelegateToElevatedHost(
572 std::unique_ptr<base::DictionaryValue> message) { 572 std::unique_ptr<base::DictionaryValue> message) {
573 NOTREACHED(); 573 NOTREACHED();
574 return false; 574 return false;
575 } 575 }
576 576
577 #endif // !defined(OS_WIN) 577 #endif // !defined(OS_WIN)
578 578
579 } // namespace remoting 579 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/setup/me2me_native_messaging_host.h ('k') | remoting/host/setup/me2me_native_messaging_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698