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

Side by Side Diff: remoting/host/chromoting_host.h

Issue 7355011: Modify Chromoting logging to hook into base logging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments + thread proxy Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_CHROMOTING_HOST_H_ 5 #ifndef REMOTING_CHROMOTING_HOST_H_
6 #define REMOTING_CHROMOTING_HOST_H_ 6 #define REMOTING_CHROMOTING_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 18 matching lines...) Expand all
29 class HostStub; 29 class HostStub;
30 class InputStub; 30 class InputStub;
31 class SessionConfig; 31 class SessionConfig;
32 class CandidateSessionConfig; 32 class CandidateSessionConfig;
33 } // namespace protocol 33 } // namespace protocol
34 34
35 class Capturer; 35 class Capturer;
36 class ChromotingHostContext; 36 class ChromotingHostContext;
37 class DesktopEnvironment; 37 class DesktopEnvironment;
38 class Encoder; 38 class Encoder;
39 class Logger;
40 class MutableHostConfig; 39 class MutableHostConfig;
41 class ScreenRecorder; 40 class ScreenRecorder;
42 41
43 // A class to implement the functionality of a host process. 42 // A class to implement the functionality of a host process.
44 // 43 //
45 // Here's the work flow of this class: 44 // Here's the work flow of this class:
46 // 1. We should load the saved GAIA ID token or if this is the first 45 // 1. We should load the saved GAIA ID token or if this is the first
47 // time the host process runs we should prompt user for the 46 // time the host process runs we should prompt user for the
48 // credential. We will use this token or credentials to authenicate 47 // credential. We will use this token or credentials to authenicate
49 // and register the host. 48 // and register the host.
(...skipping 21 matching lines...) Expand all
71 public: 70 public:
72 // Factory methods that must be used to create ChromotingHost 71 // Factory methods that must be used to create ChromotingHost
73 // instances. Returned instance takes ownership of 72 // instances. Returned instance takes ownership of
74 // |access_verifier|. It does NOT take ownership of |context|, 73 // |access_verifier|. It does NOT take ownership of |context|,
75 // |environment| and |logger|, but they should not be deleted until 74 // |environment| and |logger|, but they should not be deleted until
76 // returned host is destroyed. 75 // returned host is destroyed.
77 static ChromotingHost* Create(ChromotingHostContext* context, 76 static ChromotingHost* Create(ChromotingHostContext* context,
78 MutableHostConfig* config, 77 MutableHostConfig* config,
79 DesktopEnvironment* environment, 78 DesktopEnvironment* environment,
80 AccessVerifier* access_verifier, 79 AccessVerifier* access_verifier,
81 Logger* logger,
82 bool allow_nat_traversal); 80 bool allow_nat_traversal);
83 81
84 // Asynchronously start the host process. 82 // Asynchronously start the host process.
85 // 83 //
86 // After this is invoked, the host process will connect to the talk 84 // After this is invoked, the host process will connect to the talk
87 // network and start listening for incoming connections. 85 // network and start listening for incoming connections.
88 // 86 //
89 // This method can only be called once during the lifetime of this object. 87 // This method can only be called once during the lifetime of this object.
90 void Start(); 88 void Start();
91 89
(...skipping 21 matching lines...) Expand all
113 SignalStrategy::StatusObserver::State state) OVERRIDE; 111 SignalStrategy::StatusObserver::State state) OVERRIDE;
114 virtual void OnJidChange(const std::string& full_jid) OVERRIDE; 112 virtual void OnJidChange(const std::string& full_jid) OVERRIDE;
115 113
116 //////////////////////////////////////////////////////////////////////////// 114 ////////////////////////////////////////////////////////////////////////////
117 // ClientSession::EventHandler implementation. 115 // ClientSession::EventHandler implementation.
118 virtual void LocalLoginSucceeded( 116 virtual void LocalLoginSucceeded(
119 scoped_refptr<protocol::ConnectionToClient> client); 117 scoped_refptr<protocol::ConnectionToClient> client);
120 virtual void LocalLoginFailed( 118 virtual void LocalLoginFailed(
121 scoped_refptr<protocol::ConnectionToClient> client); 119 scoped_refptr<protocol::ConnectionToClient> client);
122 120
123 Logger* logger() { return logger_; }
124
125 // SessionManager::Listener implementation. 121 // SessionManager::Listener implementation.
126 virtual void OnSessionManagerInitialized() OVERRIDE; 122 virtual void OnSessionManagerInitialized() OVERRIDE;
127 virtual void OnIncomingSession( 123 virtual void OnIncomingSession(
128 protocol::Session* session, 124 protocol::Session* session,
129 protocol::SessionManager::IncomingSessionResponse* response) OVERRIDE; 125 protocol::SessionManager::IncomingSessionResponse* response) OVERRIDE;
130 126
131 // Sets desired configuration for the protocol. Ownership of the 127 // Sets desired configuration for the protocol. Ownership of the
132 // |config| is transferred to the object. Must be called before Start(). 128 // |config| is transferred to the object. Must be called before Start().
133 void set_protocol_config(protocol::CandidateSessionConfig* config); 129 void set_protocol_config(protocol::CandidateSessionConfig* config);
134 130
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 // Stores list of tasks that should be executed when we finish 231 // Stores list of tasks that should be executed when we finish
236 // shutdown. Used only while |state_| is set to kStopping. 232 // shutdown. Used only while |state_| is set to kStopping.
237 std::vector<Task*> shutdown_tasks_; 233 std::vector<Task*> shutdown_tasks_;
238 234
239 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); 235 DISALLOW_COPY_AND_ASSIGN(ChromotingHost);
240 }; 236 };
241 237
242 } // namespace remoting 238 } // namespace remoting
243 239
244 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ 240 #endif // REMOTING_HOST_CHROMOTING_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698