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

Unified Diff: components/copresence/rpc/rpc_handler.h

Issue 461803003: Stop playing/recording when not needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/copresence/public/whispernet_client.h ('k') | components/copresence/rpc/rpc_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/copresence/rpc/rpc_handler.h
diff --git a/components/copresence/rpc/rpc_handler.h b/components/copresence/rpc/rpc_handler.h
index 82840d8f0af4c9b37f2737ac206837c0ace5a387..bfd14cd97305077c8cf6fdd834f04df37b9adaf1 100644
--- a/components/copresence/rpc/rpc_handler.h
+++ b/components/copresence/rpc/rpc_handler.h
@@ -50,7 +50,7 @@ class RpcHandler {
const StatusCallback& callback);
// Report a set of tokens to the server for a given medium.
- void ReportTokens(const std::vector<FullToken>& tokens);
+ void ReportTokens(const std::vector<AudioToken>& tokens);
// Create the directive handler and connect it to
// the whispernet client specified by the delegate.
@@ -85,6 +85,15 @@ class RpcHandler {
int http_status_code,
const std::string& response_data);
+ // If the request has any unpublish or unsubscribe operations, it removes
+ // them from our directive handlers.
+ void ProcessRemovedOperations(const ReportRequest& request);
+
+ // Add all currently playing tokens to the update signals in this report
+ // request. This ensures that the server doesn't keep issueing new tokens to
+ // us when we're already playing valid tokens.
+ void AddPlayingTokens(ReportRequest* request);
+
void DispatchMessages(
const google::protobuf::RepeatedPtrField<SubscribedMessage>&
subscribed_messages);
« no previous file with comments | « components/copresence/public/whispernet_client.h ('k') | components/copresence/rpc/rpc_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698