OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_MEDIA_TAB_CAPTURE_ACCESS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_TAB_CAPTURE_ACCESS_HANDLER_H_ |
6 #define CHROME_BROWSER_MEDIA_TAB_CAPTURE_ACCESS_HANDLER_H_ | 6 #define CHROME_BROWSER_MEDIA_TAB_CAPTURE_ACCESS_HANDLER_H_ |
7 | 7 |
8 #include "chrome/browser/media/media_access_handler.h" | 8 #include "chrome/browser/media/media_access_handler.h" |
9 | 9 |
10 class MediaStreamCaptureIndicator; | 10 class MediaStreamCaptureIndicator; |
11 | 11 |
12 // MediaAccessHandler for TabCapture API. | 12 // MediaAccessHandler for TabCapture API. |
13 class TabCaptureAccessHandler : public MediaAccessHandler { | 13 class TabCaptureAccessHandler : public MediaAccessHandler { |
14 public: | 14 public: |
15 TabCaptureAccessHandler(); | 15 TabCaptureAccessHandler(); |
16 ~TabCaptureAccessHandler() override; | 16 ~TabCaptureAccessHandler() override; |
17 | 17 |
18 // MediaAccessHandler implementation. | 18 // MediaAccessHandler implementation. |
19 bool SupportsStreamType(const content::MediaStreamType type, | 19 bool SupportsStreamType(const content::MediaStreamType type, |
20 const extensions::Extension* extension) override; | 20 const extensions::Extension* extension) override; |
21 bool CheckMediaAccessPermission( | 21 bool CheckMediaAccessPermission( |
22 content::WebContents* web_contents, | 22 content::WebContents* web_contents, |
23 const GURL& security_origin, | 23 const GURL& security_origin, |
24 content::MediaStreamType type, | 24 content::MediaStreamType type, |
25 const extensions::Extension* extension) override; | 25 const extensions::Extension* extension) override; |
26 void HandleRequest(content::WebContents* web_contents, | 26 void HandleRequest(content::WebContents* web_contents, |
27 const content::MediaStreamRequest& request, | 27 const content::MediaStreamRequest& request, |
28 const content::MediaResponseCallback& callback, | 28 const content::MediaResponseCallback& callback, |
29 const extensions::Extension* extension) override; | 29 const extensions::Extension* extension) override; |
30 bool IsCaptureInProgress(int render_process_id, | |
31 int render_frame_id, | |
32 bool* is_link_secure); | |
33 void UpdateCapturingLinkSecured(int render_process_id, | |
34 int render_frame_id, | |
35 int page_request_id, | |
36 content::MediaStreamType stream_type, | |
37 bool is_secure); | |
38 | |
39 private: | |
40 int render_process_id_; | |
miu
2016/04/16 00:05:29
1. Shouldn't there be a list of render frames and
xjz
2016/04/21 23:50:45
Done.
| |
41 int render_frame_id_; | |
42 bool is_capturing_link_secure_; | |
43 bool extension_whitelisted_; | |
30 }; | 44 }; |
31 | 45 |
32 #endif // CHROME_BROWSER_MEDIA_TAB_CAPTURE_ACCESS_HANDLER_H_ | 46 #endif // CHROME_BROWSER_MEDIA_TAB_CAPTURE_ACCESS_HANDLER_H_ |
OLD | NEW |