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

Unified Diff: remoting/protocol/jingle_session.h

Issue 2586403003: [Chromoting] Add SessionPlugin in JingleSession (Closed)
Patch Set: Resolve review comments Created 4 years 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/protocol/jingle_session.h
diff --git a/remoting/protocol/jingle_session.h b/remoting/protocol/jingle_session.h
index 9efd42e21e5ec1527effb570c451df4f9c59b8a5..e8798acbfa3aa6363d1638ba398e08d5e327463c 100644
--- a/remoting/protocol/jingle_session.h
+++ b/remoting/protocol/jingle_session.h
@@ -43,6 +43,7 @@ class JingleSession : public Session {
const SessionConfig& config() override;
void SetTransport(Transport* transport) override;
void Close(protocol::ErrorCode error) override;
+ void Attach(std::unique_ptr<SessionPlugin> plugin) override;
private:
friend class JingleSessionManager;
@@ -119,6 +120,12 @@ class JingleSession : public Session {
// Returns true if the state of the session is not CLOSED or FAILED
bool is_session_active();
+ // Executes all plugins against incoming JingleMessage.
+ void ExecutePluginsOnIncomingMessage(const JingleMessage& message);
+
+ // Executes all plugins against outgoing JingleMessage.
+ void ExecutePluginsOnOutgoingMessage(JingleMessage* message);
+
// Returns the value of the ID attribute of the next outgoing set IQ with the
// sequence ID encoded.
std::string GetNextOutgoingId();
@@ -169,6 +176,9 @@ class JingleSession : public Session {
// authenticated.
std::vector<PendingMessage> pending_transport_info_;
+ // The SessionPlugins attached to this session.
+ std::vector<std::unique_ptr<SessionPlugin>> plugins_;
+
base::WeakPtrFactory<JingleSession> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(JingleSession);

Powered by Google App Engine
This is Rietveld 408576698