blob: 7a7d2f00d83ceae7e6cefb05e5ebba504de00023 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMECAST_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_
#define CHROMECAST_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_
#include <string>
#include "base/macros.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/extension_function.h"
namespace extensions {
namespace shell {
// Returns an OAuth2 access token for a user. See the IDL file for
// documentation.
class IdentityGetAuthTokenFunction : public UIThreadExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("identity.getAuthToken", UNKNOWN);
IdentityGetAuthTokenFunction();
protected:
~IdentityGetAuthTokenFunction() override;
// ExtensionFunction:
ResponseAction Run() override;
private:
DISALLOW_COPY_AND_ASSIGN(IdentityGetAuthTokenFunction);
};
// Stub. See the IDL file for documentation.
class IdentityRemoveCachedAuthTokenFunction : public UIThreadExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("identity.removeCachedAuthToken", UNKNOWN)
IdentityRemoveCachedAuthTokenFunction();
protected:
~IdentityRemoveCachedAuthTokenFunction() override;
// ExtensionFunction:
ResponseAction Run() override;
private:
DISALLOW_COPY_AND_ASSIGN(IdentityRemoveCachedAuthTokenFunction);
};
} // namespace shell
} // namespace extensions
#endif // CHROMECAST_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_