1 // Copyright 2015 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 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_TAB_CAPTURE_ACCESS_HANDLER_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_TAB_CAPTURE_ACCESS_HANDLER_H_
7 
8 #include "chrome/browser/media/capture_access_handler_base.h"
9 
10 // MediaAccessHandler for TabCapture API.
11 class TabCaptureAccessHandler : public CaptureAccessHandlerBase {
12  public:
13   TabCaptureAccessHandler();
14   ~TabCaptureAccessHandler() override;
15 
16   // MediaAccessHandler implementation.
17   bool SupportsStreamType(content::WebContents* web_contents,
18                           const blink::mojom::MediaStreamType type,
19                           const extensions::Extension* extension) override;
20   bool CheckMediaAccessPermission(
21       content::RenderFrameHost* render_frame_host,
22       const GURL& security_origin,
23       blink::mojom::MediaStreamType type,
24       const extensions::Extension* extension) override;
25   void HandleRequest(content::WebContents* web_contents,
26                      const content::MediaStreamRequest& request,
27                      content::MediaResponseCallback callback,
28                      const extensions::Extension* extension) override;
29 };
30 
31 #endif  // CHROME_BROWSER_MEDIA_WEBRTC_TAB_CAPTURE_ACCESS_HANDLER_H_
32