| 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_WEBRTC_PERMISSION_BUBBLE_MEDIA_ACCESS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_PERMISSION_BUBBLE_MEDIA_ACCESS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_MEDIA_WEBRTC_PERMISSION_BUBBLE_MEDIA_ACCESS_HANDLER_H_ | 6 #define CHROME_BROWSER_MEDIA_WEBRTC_PERMISSION_BUBBLE_MEDIA_ACCESS_HANDLER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| 11 #include "chrome/browser/media/media_access_handler.h" | 11 #include "chrome/browser/media/media_access_handler.h" |
| 12 #include "content/public/browser/notification_observer.h" | 12 #include "content/public/browser/notification_observer.h" |
| 13 #include "content/public/browser/notification_registrar.h" | 13 #include "content/public/browser/notification_registrar.h" |
| 14 | 14 |
| 15 // MediaAccessHandler for permission bubble requests. | 15 // MediaAccessHandler for permission bubble requests. |
| 16 class PermissionBubbleMediaAccessHandler | 16 class PermissionBubbleMediaAccessHandler |
| 17 : public MediaAccessHandler, | 17 : public MediaAccessHandler, |
| 18 public content::NotificationObserver { | 18 public content::NotificationObserver { |
| 19 public: | 19 public: |
| 20 PermissionBubbleMediaAccessHandler(); | 20 PermissionBubbleMediaAccessHandler(); |
| 21 ~PermissionBubbleMediaAccessHandler() override; | 21 ~PermissionBubbleMediaAccessHandler() 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; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 51 | 52 |
| 52 // content::NotificationObserver implementation. | 53 // content::NotificationObserver implementation. |
| 53 void Observe(int type, | 54 void Observe(int type, |
| 54 const content::NotificationSource& source, | 55 const content::NotificationSource& source, |
| 55 const content::NotificationDetails& details) override; | 56 const content::NotificationDetails& details) override; |
| 56 | 57 |
| 57 RequestsQueues pending_requests_; | 58 RequestsQueues pending_requests_; |
| 58 content::NotificationRegistrar notifications_registrar_; | 59 content::NotificationRegistrar notifications_registrar_; |
| 59 }; | 60 }; |
| 60 #endif // CHROME_BROWSER_MEDIA_WEBRTC_PERMISSION_BUBBLE_MEDIA_ACCESS_HANDLER_H_ | 61 #endif // CHROME_BROWSER_MEDIA_WEBRTC_PERMISSION_BUBBLE_MEDIA_ACCESS_HANDLER_H_ |
| OLD | NEW |