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 // This file implements a standalone host process for Me2Me. | 5 // This file implements a standalone host process for Me2Me. |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 : public ConfigWatcher::Delegate, | 145 : public ConfigWatcher::Delegate, |
146 public HeartbeatSender::Listener, | 146 public HeartbeatSender::Listener, |
147 public HostChangeNotificationListener::Listener, | 147 public HostChangeNotificationListener::Listener, |
148 public IPC::Listener, | 148 public IPC::Listener, |
149 public base::RefCountedThreadSafe<HostProcess> { | 149 public base::RefCountedThreadSafe<HostProcess> { |
150 public: | 150 public: |
151 HostProcess(scoped_ptr<ChromotingHostContext> context, | 151 HostProcess(scoped_ptr<ChromotingHostContext> context, |
152 int* exit_code_out); | 152 int* exit_code_out); |
153 | 153 |
154 // ConfigWatcher::Delegate interface. | 154 // ConfigWatcher::Delegate interface. |
155 virtual void OnConfigUpdated(const std::string& serialized_config) OVERRIDE; | 155 virtual void OnConfigUpdated(const std::string& serialized_config) override; |
156 virtual void OnConfigWatcherError() OVERRIDE; | 156 virtual void OnConfigWatcherError() override; |
157 | 157 |
158 // IPC::Listener implementation. | 158 // IPC::Listener implementation. |
159 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 159 virtual bool OnMessageReceived(const IPC::Message& message) override; |
160 virtual void OnChannelError() OVERRIDE; | 160 virtual void OnChannelError() override; |
161 | 161 |
162 // HeartbeatSender::Listener overrides. | 162 // HeartbeatSender::Listener overrides. |
163 virtual void OnHeartbeatSuccessful() OVERRIDE; | 163 virtual void OnHeartbeatSuccessful() override; |
164 virtual void OnUnknownHostIdError() OVERRIDE; | 164 virtual void OnUnknownHostIdError() override; |
165 | 165 |
166 // HostChangeNotificationListener::Listener overrides. | 166 // HostChangeNotificationListener::Listener overrides. |
167 virtual void OnHostDeleted() OVERRIDE; | 167 virtual void OnHostDeleted() override; |
168 | 168 |
169 // Initializes the pairing registry on Windows. | 169 // Initializes the pairing registry on Windows. |
170 void OnInitializePairingRegistry( | 170 void OnInitializePairingRegistry( |
171 IPC::PlatformFileForTransit privileged_key, | 171 IPC::PlatformFileForTransit privileged_key, |
172 IPC::PlatformFileForTransit unprivileged_key); | 172 IPC::PlatformFileForTransit unprivileged_key); |
173 | 173 |
174 private: | 174 private: |
175 enum HostState { | 175 enum HostState { |
176 // Host process has just been started. Waiting for config and policies to be | 176 // Host process has just been started. Waiting for config and policies to be |
177 // read from the disk. | 177 // read from the disk. |
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 int exit_code = kSuccessExitCode; | 1474 int exit_code = kSuccessExitCode; |
1475 new HostProcess(context.Pass(), &exit_code); | 1475 new HostProcess(context.Pass(), &exit_code); |
1476 | 1476 |
1477 // Run the main (also UI) message loop until the host no longer needs it. | 1477 // Run the main (also UI) message loop until the host no longer needs it. |
1478 message_loop.Run(); | 1478 message_loop.Run(); |
1479 | 1479 |
1480 return exit_code; | 1480 return exit_code; |
1481 } | 1481 } |
1482 | 1482 |
1483 } // namespace remoting | 1483 } // namespace remoting |
OLD | NEW |