| Index: components/copresence/copresence_manager_impl.h
|
| diff --git a/components/copresence/copresence_manager_impl.h b/components/copresence/copresence_manager_impl.h
|
| index d91e7aeddb7dec86fcf5f6f0499814dee4365750..69d856154af0fdf3a14ed979e5d3bbe6bf87142c 100644
|
| --- a/components/copresence/copresence_manager_impl.h
|
| +++ b/components/copresence/copresence_manager_impl.h
|
| @@ -6,10 +6,12 @@
|
| #define COMPONENTS_COPRESENCE_COPRESENCE_MANAGER_IMPL_H_
|
|
|
| #include <string>
|
| +#include <vector>
|
|
|
| #include "base/cancelable_callback.h"
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "components/copresence/copresence_state_impl.h"
|
| #include "components/copresence/public/copresence_manager.h"
|
|
|
| namespace base {
|
| @@ -39,6 +41,8 @@
|
|
|
| ~CopresenceManagerImpl() override;
|
|
|
| + // CopresenceManager overrides.
|
| + CopresenceState* state() override;
|
| void ExecuteReportRequest(const ReportRequest& request,
|
| const std::string& app_id,
|
| const std::string& auth_token,
|
| @@ -47,12 +51,16 @@
|
| private:
|
| void WhispernetInitComplete(bool success);
|
|
|
| - // This function will be called every kPollTimerIntervalMs milliseconds to
|
| - // poll the server for new messages.
|
| + // Handle tokens decoded by Whispernet.
|
| + // TODO(ckehoe): Replace AudioToken with ReceivedToken.
|
| + void ReceivedTokens(const std::vector<AudioToken>& tokens);
|
| +
|
| + // This function will be called every kPollTimerIntervalMs milliseconds
|
| + // to poll the server for new messages.
|
| void PollForMessages();
|
|
|
| - // This function will verify that we can hear the audio we're playing every
|
| - // kAudioCheckIntervalMs milliseconds.
|
| + // Verify that we can hear the audio we're playing
|
| + // every kAudioCheckIntervalMs milliseconds.
|
| void AudioCheck();
|
|
|
| // Belongs to the caller.
|
| @@ -64,8 +72,9 @@
|
|
|
| bool init_failed_;
|
|
|
| - // The GCMHandler must destruct before the DirectiveHandler,
|
| - // which must destruct before the RpcHandler. Do not change this order.
|
| + // This order is required because each object
|
| + // makes calls to those listed before it.
|
| + scoped_ptr<CopresenceStateImpl> state_;
|
| scoped_ptr<RpcHandler> rpc_handler_;
|
| scoped_ptr<DirectiveHandler> directive_handler_;
|
| scoped_ptr<GCMHandler> gcm_handler_;
|
|
|