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

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

Issue 2746873004: Move ChromeOS login media access logic into a MediaAccessHandler (Closed)
Patch Set: Move ChromeOS login media access logic into a MediaAccessHandler Created 3 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_WEBRTC_DESKTOP_CAPTURE_ACCESS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_CAPTURE_ACCESS_HANDLER_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_CAPTURE_ACCESS_HANDLER_H_ 6 #define CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_CAPTURE_ACCESS_HANDLER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "chrome/browser/media/capture_access_handler_base.h" 10 #include "chrome/browser/media/capture_access_handler_base.h"
11 #include "chrome/browser/media/media_access_handler.h" 11 #include "chrome/browser/media/media_access_handler.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 class Extension; 14 class Extension;
15 } 15 }
16 16
17 // MediaAccessHandler for DesktopCapture API. 17 // MediaAccessHandler for DesktopCapture API.
18 class DesktopCaptureAccessHandler : public CaptureAccessHandlerBase { 18 class DesktopCaptureAccessHandler : public CaptureAccessHandlerBase {
19 public: 19 public:
20 DesktopCaptureAccessHandler(); 20 DesktopCaptureAccessHandler();
21 ~DesktopCaptureAccessHandler() override; 21 ~DesktopCaptureAccessHandler() override;
22 22
23 // MediaAccessHandler implementation. 23 // MediaAccessHandler implementation.
24 bool SupportsStreamType(const content::MediaStreamType type, 24 bool SupportsStreamType(content::WebContents* web_contents,
25 const content::MediaStreamType type,
25 const extensions::Extension* extension) override; 26 const extensions::Extension* extension) override;
26 bool CheckMediaAccessPermission( 27 bool CheckMediaAccessPermission(
27 content::WebContents* web_contents, 28 content::WebContents* web_contents,
28 const GURL& security_origin, 29 const GURL& security_origin,
29 content::MediaStreamType type, 30 content::MediaStreamType type,
30 const extensions::Extension* extension) override; 31 const extensions::Extension* extension) override;
31 void HandleRequest(content::WebContents* web_contents, 32 void HandleRequest(content::WebContents* web_contents,
32 const content::MediaStreamRequest& request, 33 const content::MediaStreamRequest& request,
33 const content::MediaResponseCallback& callback, 34 const content::MediaResponseCallback& callback,
34 const extensions::Extension* extension) override; 35 const extensions::Extension* extension) override;
35 36
36 private: 37 private:
37 void ProcessScreenCaptureAccessRequest( 38 void ProcessScreenCaptureAccessRequest(
38 content::WebContents* web_contents, 39 content::WebContents* web_contents,
39 const content::MediaStreamRequest& request, 40 const content::MediaStreamRequest& request,
40 const content::MediaResponseCallback& callback, 41 const content::MediaResponseCallback& callback,
41 const extensions::Extension* extension); 42 const extensions::Extension* extension);
42 43
43 // Returns whether desktop capture is always approved for |extension|. 44 // Returns whether desktop capture is always approved for |extension|.
44 // Currently component extensions and some whitelisted extensions are default 45 // Currently component extensions and some whitelisted extensions are default
45 // approved. 46 // approved.
46 static bool IsDefaultApproved(const extensions::Extension* extension); 47 static bool IsDefaultApproved(const extensions::Extension* extension);
47 }; 48 };
48 49
49 #endif // CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_CAPTURE_ACCESS_HANDLER_H_ 50 #endif // CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_CAPTURE_ACCESS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698