| 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 #ifndef REMOTING_HOST_CHROMOTING_HOST_H_ | 5 #ifndef REMOTING_HOST_CHROMOTING_HOST_H_ |
| 6 #define REMOTING_HOST_CHROMOTING_HOST_H_ | 6 #define REMOTING_HOST_CHROMOTING_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
| 14 #include "net/base/backoff_entry.h" | 14 #include "net/base/backoff_entry.h" |
| 15 #include "remoting/base/encoder.h" | 15 #include "remoting/base/encoder.h" |
| 16 #include "remoting/host/capturer.h" | |
| 17 #include "remoting/host/client_session.h" | 16 #include "remoting/host/client_session.h" |
| 18 #include "remoting/host/desktop_environment.h" | 17 #include "remoting/host/desktop_environment.h" |
| 19 #include "remoting/host/host_key_pair.h" | 18 #include "remoting/host/host_key_pair.h" |
| 20 #include "remoting/host/host_status_observer.h" | 19 #include "remoting/host/host_status_observer.h" |
| 21 #include "remoting/host/mouse_move_observer.h" | 20 #include "remoting/host/mouse_move_observer.h" |
| 22 #include "remoting/host/ui_strings.h" | 21 #include "remoting/host/ui_strings.h" |
| 23 #include "remoting/protocol/authenticator.h" | 22 #include "remoting/protocol/authenticator.h" |
| 24 #include "remoting/protocol/session_manager.h" | 23 #include "remoting/protocol/session_manager.h" |
| 25 #include "remoting/protocol/connection_to_client.h" | 24 #include "remoting/protocol/connection_to_client.h" |
| 26 | 25 |
| 27 namespace remoting { | 26 namespace remoting { |
| 28 | 27 |
| 29 namespace protocol { | 28 namespace protocol { |
| 30 class InputStub; | 29 class InputStub; |
| 31 class SessionConfig; | 30 class SessionConfig; |
| 32 class CandidateSessionConfig; | 31 class CandidateSessionConfig; |
| 33 } // namespace protocol | 32 } // namespace protocol |
| 34 | 33 |
| 35 class AudioScheduler; | 34 class AudioScheduler; |
| 36 class Capturer; | |
| 37 class ChromotingHostContext; | 35 class ChromotingHostContext; |
| 38 class DesktopEnvironment; | 36 class DesktopEnvironment; |
| 39 class Encoder; | 37 class Encoder; |
| 40 class ScreenRecorder; | 38 class ScreenRecorder; |
| 39 class VideoFrameCapturer; |
| 41 | 40 |
| 42 // A class to implement the functionality of a host process. | 41 // A class to implement the functionality of a host process. |
| 43 // | 42 // |
| 44 // Here's the work flow of this class: | 43 // Here's the work flow of this class: |
| 45 // 1. We should load the saved GAIA ID token or if this is the first | 44 // 1. We should load the saved GAIA ID token or if this is the first |
| 46 // time the host process runs we should prompt user for the | 45 // time the host process runs we should prompt user for the |
| 47 // credential. We will use this token or credentials to authenicate | 46 // credential. We will use this token or credentials to authenicate |
| 48 // and register the host. | 47 // and register the host. |
| 49 // | 48 // |
| 50 // 2. We listen for incoming connection using libjingle. We will create | 49 // 2. We listen for incoming connection using libjingle. We will create |
| 51 // a ConnectionToClient object that wraps around linjingle for transport. | 50 // a ConnectionToClient object that wraps around linjingle for transport. |
| 52 // A ScreenRecorder is created with an Encoder and a Capturer. | 51 // A ScreenRecorder is created with an Encoder and a VideoFrameCapturer. |
| 53 // A ConnectionToClient is added to the ScreenRecorder for transporting | 52 // A ConnectionToClient is added to the ScreenRecorder for transporting |
| 54 // the screen captures. An InputStub is created and registered with the | 53 // the screen captures. An InputStub is created and registered with the |
| 55 // ConnectionToClient to receive mouse / keyboard events from the remote | 54 // ConnectionToClient to receive mouse / keyboard events from the remote |
| 56 // client. | 55 // client. |
| 57 // After we have done all the initialization we'll start the ScreenRecorder. | 56 // After we have done all the initialization we'll start the ScreenRecorder. |
| 58 // We'll then enter the running state of the host process. | 57 // We'll then enter the running state of the host process. |
| 59 // | 58 // |
| 60 // 3. When the user is disconnected, we will pause the ScreenRecorder | 59 // 3. When the user is disconnected, we will pause the ScreenRecorder |
| 61 // and try to terminate the threads we have created. This will allow | 60 // and try to terminate the threads we have created. This will allow |
| 62 // all pending tasks to complete. After all of that completed we | 61 // all pending tasks to complete. After all of that completed we |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 224 |
| 226 // The maximum duration of any session. | 225 // The maximum duration of any session. |
| 227 base::TimeDelta max_session_duration_; | 226 base::TimeDelta max_session_duration_; |
| 228 | 227 |
| 229 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); | 228 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); |
| 230 }; | 229 }; |
| 231 | 230 |
| 232 } // namespace remoting | 231 } // namespace remoting |
| 233 | 232 |
| 234 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ | 233 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ |
| OLD | NEW |