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

Side by Side Diff: chrome/browser/media/desktop_capture_access_handler.h

Issue 1873293002: Report if video capturing meets output protection requirement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
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_DESKTOP_CAPTURE_ACCESS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_DESKTOP_CAPTURE_ACCESS_HANDLER_H_
6 #define CHROME_BROWSER_MEDIA_DESKTOP_CAPTURE_ACCESS_HANDLER_H_ 6 #define CHROME_BROWSER_MEDIA_DESKTOP_CAPTURE_ACCESS_HANDLER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "chrome/browser/media/media_access_handler.h" 10 #include "chrome/browser/media/media_access_handler.h"
(...skipping 17 matching lines...) Expand all
28 void HandleRequest(content::WebContents* web_contents, 28 void HandleRequest(content::WebContents* web_contents,
29 const content::MediaStreamRequest& request, 29 const content::MediaStreamRequest& request,
30 const content::MediaResponseCallback& callback, 30 const content::MediaResponseCallback& callback,
31 const extensions::Extension* extension) override; 31 const extensions::Extension* extension) override;
32 void UpdateMediaRequestState(int render_process_id, 32 void UpdateMediaRequestState(int render_process_id,
33 int render_frame_id, 33 int render_frame_id,
34 int page_request_id, 34 int page_request_id,
35 content::MediaStreamType stream_type, 35 content::MediaStreamType stream_type,
36 content::MediaRequestState state) override; 36 content::MediaRequestState state) override;
37 37
38 // TODO(xjz): To be removed.
miu 2016/04/16 00:05:29 crbug link?
xjz 2016/04/21 23:50:44 Do we need a crbug for this one? It will be remove
miu 2016/04/26 01:25:13 That's fine, if you know this will happen soon.
38 bool IsCaptureInProgress(); 39 bool IsCaptureInProgress();
39 40
41 bool IsCaptureInProgress(int render_process_id,
miu 2016/04/16 00:05:29 Seems like these two new methods should be in the
xjz 2016/04/21 23:50:44 Done. Moved them to the new CaptureAccessHandlerBa
42 int render_frame_id,
43 bool* is_link_secure);
44 void UpdateCapturingLinkSecured(int render_process_id,
45 int render_frame_id,
46 int page_request_id,
47 content::MediaStreamType stream_type,
48 bool is_secure);
49
40 private: 50 private:
41 // Tracks MEDIA_DESKTOP_VIDEO_CAPTURE sessions which reach the 51 // Tracks MEDIA_DESKTOP_VIDEO_CAPTURE sessions which reach the
42 // MEDIA_REQUEST_STATE_DONE state. Sessions are remove when 52 // MEDIA_REQUEST_STATE_DONE state. Sessions are remove when
43 // MEDIA_REQUEST_STATE_CLOSING is encountered. 53 // MEDIA_REQUEST_STATE_CLOSING is encountered.
44 struct DesktopCaptureSession { 54 struct DesktopCaptureSession {
45 int render_process_id; 55 int render_process_id;
46 int render_frame_id; 56 int render_frame_id;
47 int page_request_id; 57 int page_request_id;
58 bool is_capturing_link_secure;
48 }; 59 };
49 typedef std::list<DesktopCaptureSession> DesktopCaptureSessions; 60 typedef std::list<DesktopCaptureSession> DesktopCaptureSessions;
50 61
51 void ProcessScreenCaptureAccessRequest( 62 void ProcessScreenCaptureAccessRequest(
52 content::WebContents* web_contents, 63 content::WebContents* web_contents,
53 const content::MediaStreamRequest& request, 64 const content::MediaStreamRequest& request,
54 const content::MediaResponseCallback& callback, 65 const content::MediaResponseCallback& callback,
55 const extensions::Extension* extension); 66 const extensions::Extension* extension);
56 67
57 DesktopCaptureSessions desktop_capture_sessions_; 68 DesktopCaptureSessions desktop_capture_sessions_;
69
70 // If the extension is authorized for casting.
miu 2016/04/16 00:05:29 nit: Let's expand a bit on this comment here. How
xjz 2016/04/21 23:50:44 Moved it into the |session| structure, as it shoul
71 bool extension_whitelisted_;
miu 2016/04/16 00:05:29 naming nit (for accuracy): How about: trusted_exte
xjz 2016/04/21 23:50:44 Moved it into the |Session| structure.
58 }; 72 };
59 73
60 #endif // CHROME_BROWSER_MEDIA_DESKTOP_CAPTURE_ACCESS_HANDLER_H_ 74 #endif // CHROME_BROWSER_MEDIA_DESKTOP_CAPTURE_ACCESS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698