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

Unified Diff: remoting/client/plugin/chromoting_instance.h

Issue 12475020: Client plugin changes to support third party authentication. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reviewer comments Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/plugin/chromoting_instance.h
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index a57275abc9b3c20c777729bc8214c6370c1bc69b..c6c8f578fbcc1849fa617c5e39939893a5b5ed55 100644
--- a/remoting/client/plugin/chromoting_instance.h
+++ b/remoting/client/plugin/chromoting_instance.h
@@ -40,6 +40,7 @@
#include "remoting/protocol/input_event_tracker.h"
#include "remoting/protocol/mouse_input_filter.h"
#include "remoting/protocol/negotiating_client_authenticator.h"
+#include "remoting/protocol/third_party_client_authenticator.h"
namespace base {
class DictionaryValue;
@@ -57,6 +58,7 @@ class ChromotingStats;
class ClientContext;
class FrameConsumerProxy;
class PepperAudioPlayer;
+class PepperTokenFetcher;
class PepperView;
class PepperXmppProxy;
class RectangleUpdateDecoder;
@@ -108,6 +110,8 @@ class ChromotingInstance :
virtual void OnConnectionReady(bool ready) OVERRIDE;
virtual protocol::ClipboardStub* GetClipboardStub() OVERRIDE;
virtual protocol::CursorShapeStub* GetCursorShapeStub() OVERRIDE;
+ virtual scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher>
+ GetTokenFetcher(const std::string& host_public_key) OVERRIDE;
// protocol::ClipboardStub interface.
virtual void InjectClipboardEvent(
@@ -147,6 +151,13 @@ class ChromotingInstance :
static bool LogToUI(int severity, const char* file, int line,
size_t message_start, const std::string& str);
+ // Requests the webapp to fetch a third-party token.
+ void FetchThirdPartyToken(
+ const GURL& token_url,
+ const std::string& host_public_key,
+ const std::string& scope,
+ const base::WeakPtr<PepperTokenFetcher> pepper_token_fetcher);
+
private:
FRIEND_TEST_ALL_PREFIXES(ChromotingInstanceTest, TestCaseSetup);
@@ -170,6 +181,8 @@ class ChromotingInstance :
void PauseVideo(bool pause);
void PauseAudio(bool pause);
void OnPinFetched(const std::string& pin);
+ void OnThirdPartyTokenFetched(const std::string& token,
+ const std::string& shared_secret);
// Helper method to post messages to the webapp.
void PostChromotingMessage(const std::string& method,
@@ -227,6 +240,8 @@ class ChromotingInstance :
bool use_async_pin_dialog_;
protocol::SecretFetchedCallback secret_fetched_callback_;
+ base::WeakPtr<PepperTokenFetcher> pepper_token_fetcher_;
+
base::WeakPtrFactory<ChromotingInstance> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);

Powered by Google App Engine
This is Rietveld 408576698