Chromium Code Reviews| 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..c5012d5ff295cbac16aa4400610f4d5b4c3e0844 |
| --- /dev/null |
| +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_api.h |
| @@ -0,0 +1,60 @@ |
| +// 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/common/extensions/api/experimental_tab_capture.h" |
| + |
| +namespace extensions { |
| + |
| +class TabCaptureAsyncApiFunction : public AsyncApiFunction { |
|
Aaron Boodman
2012/10/04 07:21:43
Is it possible to use IOThreadExtensionFunction in
justinlin
2012/10/08 09:58:31
I can't seem to return a value when I use that int
Aaron Boodman
2012/10/16 04:19:27
ExtensionFunctionDispatcher is handling this funct
Aaron Boodman
2012/10/16 04:22:28
Note: This comment only applies if http://coderevi
justinlin
2012/10/17 08:32:26
OK, so from what I can tell, this would make the f
|
| + public: |
| + TabCaptureAsyncApiFunction(); |
| + |
| + protected: |
| + virtual ~TabCaptureAsyncApiFunction(); |
| + |
| + // AsyncApiFunction: |
| + virtual bool Respond() OVERRIDE; |
| +}; |
| + |
| +class TabCaptureGetTabMediaFunction : public TabCaptureAsyncApiFunction { |
| + public: |
| + DECLARE_EXTENSION_FUNCTION_NAME("experimental.tabCapture.getTabMedia"); |
| + TabCaptureGetTabMediaFunction(); |
| + |
| + protected: |
| + virtual ~TabCaptureGetTabMediaFunction(); |
| + |
| + // AsyncApiFunction: |
| + virtual bool Prepare() OVERRIDE; |
| + virtual void Work() OVERRIDE; |
| + |
| + private: |
| + scoped_ptr<api::experimental_tab_capture::GetTabMedia::Params> params_; |
| +}; |
| + |
| +class TabCaptureGetCapturedTabsFunction : public TabCaptureAsyncApiFunction { |
| + public: |
| + DECLARE_EXTENSION_FUNCTION_NAME("experimental.tabCapture.getCapturedTabs"); |
| + TabCaptureGetCapturedTabsFunction(); |
| + |
| + protected: |
| + virtual ~TabCaptureGetCapturedTabsFunction(); |
| + |
| + // AsyncApiFunction: |
| + virtual bool Prepare() OVERRIDE; |
| + virtual void Work() OVERRIDE; |
| + |
| + private: |
| +}; |
| + |
| +} // namespace extensions |
| + |
| +#endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_API_H_ |