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

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

Issue 11090063: [Chromoting] Add a simple Windows app that registers and starts a host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review. Created 8 years, 2 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
« no previous file with comments | « no previous file | remoting/host/setup/host_starter.cc » ('j') | remoting/host/setup/host_starter.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_HOST_STARTER 5 #ifndef REMOTING_HOST_HOST_STARTER
6 #define REMOTING_HOST_HOST_STARTER 6 #define REMOTING_HOST_HOST_STARTER
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 26 matching lines...) Expand all
37 37
38 // Creates a HostStarter. 38 // Creates a HostStarter.
39 static scoped_ptr<HostStarter> Create( 39 static scoped_ptr<HostStarter> Create(
40 net::URLRequestContextGetter* url_request_context_getter); 40 net::URLRequestContextGetter* url_request_context_getter);
41 41
42 // Registers a new host with the Chromoting service, and starts it. 42 // Registers a new host with the Chromoting service, and starts it.
43 // |auth_code| must be a valid OAuth2 authorization code, typically acquired 43 // |auth_code| must be a valid OAuth2 authorization code, typically acquired
44 // from a browser. This method uses that code to get an OAuth2 refresh token. 44 // from a browser. This method uses that code to get an OAuth2 refresh token.
45 void StartHost(const std::string& host_name, const std::string& host_pin, 45 void StartHost(const std::string& host_name, const std::string& host_pin,
46 bool consent_to_data_collection, const std::string& auth_code, 46 bool consent_to_data_collection, const std::string& auth_code,
47 CompletionCallback on_done); 47 CompletionCallback on_done,
48 scoped_refptr<base::SingleThreadTaskRunner> on_done_runner);
48 49
49 // gaia::GaiaOAuthClient::Delegate 50 // gaia::GaiaOAuthClient::Delegate
50 virtual void OnGetTokensResponse(const std::string& refresh_token, 51 virtual void OnGetTokensResponse(const std::string& refresh_token,
51 const std::string& access_token, 52 const std::string& access_token,
52 int expires_in_seconds) OVERRIDE; 53 int expires_in_seconds) OVERRIDE;
53 virtual void OnRefreshTokenResponse(const std::string& access_token, 54 virtual void OnRefreshTokenResponse(const std::string& access_token,
54 int expires_in_seconds) OVERRIDE; 55 int expires_in_seconds) OVERRIDE;
55 virtual void OnOAuthError() OVERRIDE; 56 virtual void OnOAuthError() OVERRIDE;
56 virtual void OnNetworkError(int response_code) OVERRIDE; 57 virtual void OnNetworkError(int response_code) OVERRIDE;
57 58
(...skipping 14 matching lines...) Expand all
72 scoped_ptr<gaia::GaiaOAuthClient> oauth_client_; 73 scoped_ptr<gaia::GaiaOAuthClient> oauth_client_;
73 scoped_ptr<remoting::GaiaUserEmailFetcher> user_email_fetcher_; 74 scoped_ptr<remoting::GaiaUserEmailFetcher> user_email_fetcher_;
74 scoped_ptr<remoting::ServiceClient> service_client_; 75 scoped_ptr<remoting::ServiceClient> service_client_;
75 scoped_ptr<remoting::DaemonController> daemon_controller_; 76 scoped_ptr<remoting::DaemonController> daemon_controller_;
76 bool in_progress_; 77 bool in_progress_;
77 gaia::OAuthClientInfo oauth_client_info_; 78 gaia::OAuthClientInfo oauth_client_info_;
78 std::string host_name_; 79 std::string host_name_;
79 std::string host_pin_; 80 std::string host_pin_;
80 bool consent_to_data_collection_; 81 bool consent_to_data_collection_;
81 CompletionCallback on_done_; 82 CompletionCallback on_done_;
83 scoped_refptr<base::SingleThreadTaskRunner> on_done_runner_;
82 std::string refresh_token_; 84 std::string refresh_token_;
83 std::string access_token_; 85 std::string access_token_;
84 std::string user_email_; 86 std::string user_email_;
85 remoting::HostKeyPair key_pair_; 87 remoting::HostKeyPair key_pair_;
86 std::string host_id_; 88 std::string host_id_;
87 89
88 DISALLOW_COPY_AND_ASSIGN(HostStarter); 90 DISALLOW_COPY_AND_ASSIGN(HostStarter);
89 }; 91 };
90 92
91 } // namespace remoting 93 } // namespace remoting
92 94
93 #endif // REMOTING_HOST_HOST_STARTER 95 #endif // REMOTING_HOST_HOST_STARTER
OLDNEW
« no previous file with comments | « no previous file | remoting/host/setup/host_starter.cc » ('j') | remoting/host/setup/host_starter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698