| Index: chrome/browser/extensions/api/tab_capture/tab_capture_api.h
|
| diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_api.h b/chrome/browser/extensions/api/tab_capture/tab_capture_api.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..909e307626659c5bd0ee4d90d5bfc03c00f3aac6
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_api.h
|
| @@ -0,0 +1,52 @@
|
| +// Copyright (c) 2012 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.
|
| +
|
| +// Defines the Chrome Extensions Tab Capture API functions for accessing
|
| +// tab media streams.
|
| +
|
| +#ifndef CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_API_H_
|
| +#define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_API_H_
|
| +
|
| +#include "chrome/browser/extensions/api/api_function.h"
|
| +#include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h"
|
| +#include "chrome/common/extensions/api/tab_capture.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +
|
| +class TabCaptureCaptureFunction : public AsyncApiFunction {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION_NAME("tabCapture.capture");
|
| + TabCaptureCaptureFunction();
|
| +
|
| + protected:
|
| + virtual ~TabCaptureCaptureFunction();
|
| +
|
| + // AsyncApiFunction:
|
| + virtual bool Prepare() OVERRIDE;
|
| + virtual void Work() OVERRIDE;
|
| + virtual bool Respond() OVERRIDE;
|
| +
|
| + private:
|
| + scoped_ptr<api::tab_capture::Capture::Params> params_;
|
| + std::string request_key_;
|
| + TabCaptureRegistry::TabCaptureRequest request_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TabCaptureCaptureFunction);
|
| +};
|
| +
|
| +class TabCaptureGetCapturedTabsFunction : public SyncExtensionFunction {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION_NAME("tabCapture.getCapturedTabs");
|
| +
|
| + protected:
|
| + virtual ~TabCaptureGetCapturedTabsFunction() {}
|
| +
|
| + // ExtensionFunction:
|
| + virtual bool RunImpl() OVERRIDE;
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_API_H_
|
|
|