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

Unified Diff: components/copresence/public/copresence_constants.h

Issue 824593003: Revert of Adding CopresenceState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: components/copresence/public/copresence_constants.h
diff --git a/components/copresence/public/copresence_constants.h b/components/copresence/public/copresence_constants.h
index ae75f77d8f5597e7e0c24d10a4a2430e5d2d4571..68f8a907d6a11b3eb76410ee85ede30067d1e622 100644
--- a/components/copresence/public/copresence_constants.h
+++ b/components/copresence/public/copresence_constants.h
@@ -10,7 +10,6 @@
#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
-#include "components/copresence/tokens.h"
#include "media/base/channel_layout.h"
namespace media {
@@ -18,8 +17,6 @@
}
namespace copresence {
-
-class Directive;
// Audio constants. Currently used from the AudioPlayer/AudioRecorder.
// TODO(rkc): Make these values configurable then remove them from here.
@@ -39,7 +36,6 @@
extern const int kDefaultChannels;
extern const media::ChannelLayout kDefaultChannelLayout;
-
// These constants are used from everywhere.
// Particularly, these are used to index the directive lists in the
// audio manager, so do not change these enums without changing
@@ -51,6 +47,12 @@
AUDIO_TYPE_UNKNOWN = 3,
};
+struct AudioToken {
+ AudioToken(const std::string& token, bool audible)
+ : token(token), audible(audible) {}
+ std::string token;
+ bool audible;
+};
// These callbacks are used from various places in Copresence.
@@ -58,6 +60,8 @@
using SuccessCallback = base::Callback<void(bool)>;
// Callback to pass around found tokens.
+// Arguments:
+// const std::vector<AudioToken>& tokens - List of found tokens.
using TokensCallback = base::Callback<void(const std::vector<AudioToken>&)>;
// Callback to receive encoded samples from Whispernet.
@@ -68,10 +72,6 @@
base::Callback<void(AudioType,
const std::string&,
const scoped_refptr<media::AudioBusRefCounted>&)>;
-
-// Callback to pass a list of directives back to CopresenceState.
-using DirectivesCallback = base::Callback<void(const std::vector<Directive>&)>;
-
} // namespace copresence
#endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_CONSTANTS_H_
« no previous file with comments | « components/copresence/handlers/directive_handler_unittest.cc ('k') | components/copresence/public/copresence_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698