Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Defines the Chrome Extensions Tab Capture API functions for accessing | |
| 6 // tab media streams. | |
| 7 | |
| 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_API_H_ | |
| 9 #define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_API_H_ | |
| 10 | |
| 11 #include "chrome/browser/extensions/api/api_function.h" | |
| 12 #include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h" | |
| 13 #include "chrome/common/extensions/api/tab_capture.h" | |
| 14 | |
| 15 namespace extensions { | |
| 16 | |
|
Aaron Boodman
2012/10/17 20:28:14
extra line here
justinlin
2012/10/17 23:41:48
Done.
| |
| 17 | |
| 18 class TabCaptureCaptureFunction : public AsyncApiFunction { | |
| 19 public: | |
| 20 DECLARE_EXTENSION_FUNCTION_NAME("tabCapture.capture"); | |
| 21 TabCaptureCaptureFunction(); | |
| 22 | |
| 23 protected: | |
| 24 virtual ~TabCaptureCaptureFunction(); | |
| 25 | |
| 26 // AsyncApiFunction: | |
| 27 virtual bool Prepare() OVERRIDE; | |
| 28 virtual void Work() OVERRIDE; | |
| 29 virtual bool Respond() OVERRIDE; | |
| 30 | |
| 31 private: | |
| 32 scoped_ptr<api::tab_capture::Capture::Params> params_; | |
| 33 std::string request_key_; | |
| 34 TabCaptureRegistry::TabCaptureRequest request_; | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(TabCaptureCaptureFunction); | |
| 37 }; | |
| 38 | |
| 39 class TabCaptureGetCapturedTabsFunction : public SyncExtensionFunction { | |
| 40 public: | |
| 41 DECLARE_EXTENSION_FUNCTION_NAME("tabCapture.getCapturedTabs"); | |
| 42 | |
| 43 protected: | |
| 44 virtual ~TabCaptureGetCapturedTabsFunction() {} | |
| 45 | |
| 46 // ExtensionFunction: | |
| 47 virtual bool RunImpl() OVERRIDE; | |
| 48 }; | |
| 49 | |
| 50 } // namespace extensions | |
| 51 | |
| 52 #endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_API_H_ | |
| OLD | NEW |