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

Side by Side Diff: remoting/client/plugin/pepper_token_fetcher.h

Issue 311983003: Third Party Authentication for Android Part I - TokenFetcherProxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing CR feedbacks Created 6 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_TOKEN_FETCHER_H_
6 #define REMOTING_CLIENT_PLUGIN_PEPPER_TOKEN_FETCHER_H_
7
8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h"
10 #include "remoting/protocol/third_party_client_authenticator.h"
11
12 namespace remoting {
13
14 class ChromotingInstance;
15
16 class PepperTokenFetcher
17 : public protocol::ThirdPartyClientAuthenticator::TokenFetcher {
18 public:
19 PepperTokenFetcher(base::WeakPtr<ChromotingInstance> plugin,
20 const std::string& host_public_key);
21 virtual ~PepperTokenFetcher();
22
23 // protocol::TokenClientAuthenticator::TokenFetcher interface.
24 virtual void FetchThirdPartyToken(
25 const GURL& token_url,
26 const std::string& scope,
27 const TokenFetchedCallback& token_fetched_callback) OVERRIDE;
28
29 // Called by ChromotingInstance when the webapp finishes fetching the token.
30 void OnTokenFetched(const std::string& token,
31 const std::string& shared_secret);
32
33 private:
34 base::WeakPtr<ChromotingInstance> plugin_;
35 std::string host_public_key_;
36 TokenFetchedCallback token_fetched_callback_;
37 base::WeakPtrFactory<PepperTokenFetcher> weak_factory_;
38
39 DISALLOW_COPY_AND_ASSIGN(PepperTokenFetcher);
40 };
41
42 } // namespace remoting
43
44 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_TOKEN_FETCHER_H_
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/client/plugin/pepper_token_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698