| Index: chrome/browser/extensions/api/push_messaging/push_messaging_api.h
|
| diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_api.h b/chrome/browser/extensions/api/push_messaging/push_messaging_api.h
|
| index 5d8e95cc92354a4aad3fbf48def392ed1988d9ac..42b10246d555f059ffdb4a0e9e201d8cd6049df4 100644
|
| --- a/chrome/browser/extensions/api/push_messaging/push_messaging_api.h
|
| +++ b/chrome/browser/extensions/api/push_messaging/push_messaging_api.h
|
| @@ -9,7 +9,11 @@
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/gtest_prod_util.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "chrome/browser/extensions/api/push_messaging/invalidation_handler_observer.h"
|
| +#include "chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher.h"
|
| +#include "chrome/browser/extensions/extension_function.h"
|
| +#include "chrome/common/net/gaia/google_service_auth_error.h"
|
|
|
| class Profile;
|
|
|
| @@ -36,6 +40,30 @@ class PushMessagingEventRouter : public InvalidationHandlerObserver {
|
| DISALLOW_COPY_AND_ASSIGN(PushMessagingEventRouter);
|
| };
|
|
|
| +class PushMessagingGetChannelIdFunction
|
| + : public AsyncExtensionFunction, public ObfuscatedGaiaIdFetcher::Delegate {
|
| + public:
|
| + PushMessagingGetChannelIdFunction();
|
| +
|
| + protected:
|
| + virtual ~PushMessagingGetChannelIdFunction();
|
| +
|
| + // ExtensionFunction:
|
| + virtual bool RunImpl() OVERRIDE;
|
| + DECLARE_EXTENSION_FUNCTION_NAME("experimental.pushMessaging.getChannelId");
|
| +
|
| + private:
|
| + void ReportResult(const std::string& gaiaId, const long status);
|
| + // ObfuscatedGiaiaIdFetcher::Delegate implementation.
|
| + virtual void OnObfuscatedGaiaIdFetchSuccess(const std::string& gaia_id)
|
| + OVERRIDE;
|
| + virtual void OnObfuscatedGaiaIdFetchFailure(
|
| + const GoogleServiceAuthError& error) OVERRIDE;
|
| + scoped_ptr<ObfuscatedGaiaIdFetcher> fetcher_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(PushMessagingGetChannelIdFunction);
|
| +};
|
| +
|
| } // namespace extension
|
|
|
| #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__
|
|
|