OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 // Asks permission to use the camera and/or microphone. If permission is | 437 // Asks permission to use the camera and/or microphone. If permission is |
438 // granted, a call should be made to |callback| with the devices. If the | 438 // granted, a call should be made to |callback| with the devices. If the |
439 // request is denied, a call should be made to |callback| with an empty list | 439 // request is denied, a call should be made to |callback| with an empty list |
440 // of devices. |request| has the details of the request (e.g. which of audio | 440 // of devices. |request| has the details of the request (e.g. which of audio |
441 // and/or video devices are requested, and lists of available devices). | 441 // and/or video devices are requested, and lists of available devices). |
442 virtual void RequestMediaAccessPermission( | 442 virtual void RequestMediaAccessPermission( |
443 WebContents* web_contents, | 443 WebContents* web_contents, |
444 const MediaStreamRequest& request, | 444 const MediaStreamRequest& request, |
445 const MediaResponseCallback& callback); | 445 const MediaResponseCallback& callback); |
446 | 446 |
| 447 // Checks if we have permission to access the microphone or camera. Note that |
| 448 // this does not query the user. |type| must be MEDIA_DEVICE_AUDIO_CAPTURE |
| 449 // or MEDIA_DEVICE_VIDEO_CAPTURE. |
| 450 virtual bool CheckMediaAccessPermission(WebContents* web_contents, |
| 451 const GURL& security_origin, |
| 452 MediaStreamType type); |
| 453 |
447 // Requests permission to access the PPAPI broker. The delegate should return | 454 // Requests permission to access the PPAPI broker. The delegate should return |
448 // true and call the passed in |callback| with the result, or return false | 455 // true and call the passed in |callback| with the result, or return false |
449 // to indicate that it does not support asking for permission. | 456 // to indicate that it does not support asking for permission. |
450 virtual bool RequestPpapiBrokerPermission( | 457 virtual bool RequestPpapiBrokerPermission( |
451 WebContents* web_contents, | 458 WebContents* web_contents, |
452 const GURL& url, | 459 const GURL& url, |
453 const base::FilePath& plugin_path, | 460 const base::FilePath& plugin_path, |
454 const base::Callback<void(bool)>& callback); | 461 const base::Callback<void(bool)>& callback); |
455 | 462 |
456 // Returns the size for the new render view created for the pending entry in | 463 // Returns the size for the new render view created for the pending entry in |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 // Called when |this| is no longer the WebContentsDelegate for |source|. | 498 // Called when |this| is no longer the WebContentsDelegate for |source|. |
492 void Detach(WebContents* source); | 499 void Detach(WebContents* source); |
493 | 500 |
494 // The WebContents that this is currently a delegate for. | 501 // The WebContents that this is currently a delegate for. |
495 std::set<WebContents*> attached_contents_; | 502 std::set<WebContents*> attached_contents_; |
496 }; | 503 }; |
497 | 504 |
498 } // namespace content | 505 } // namespace content |
499 | 506 |
500 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 507 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |