Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: chrome/browser/extensions/api/tab_capture/tab_capture_api.h

Issue 11038021: Implement Chrome Extension TabCapture API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Media class renames/moves Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698