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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
433 bool last_unlocked_by_target) {} | 433 bool last_unlocked_by_target) {} |
434 | 434 |
435 // Notification that the page has lost the mouse lock. | 435 // Notification that the page has lost the mouse lock. |
436 virtual void LostMouseLock() {} | 436 virtual void LostMouseLock() {} |
437 | 437 |
438 // Asks permission to use the camera and/or microphone. If permission is | 438 // Asks permission to use the camera and/or microphone. If permission is |
439 // granted, a call should be made to |callback| with the devices. If the | 439 // granted, a call should be made to |callback| with the devices. If the |
440 // request is denied, a call should be made to |callback| with an empty list | 440 // request is denied, a call should be made to |callback| with an empty list |
441 // of devices. |request| has the details of the request (e.g. which of audio | 441 // of devices. |request| has the details of the request (e.g. which of audio |
442 // and/or video devices are requested, and lists of available devices). | 442 // and/or video devices are requested, and lists of available devices). |
443 // Delegates that expect this to be ever called, must implement the function. | |
jam
2014/09/24 20:50:04
nit: this comment and the one below are redundant.
Henrik Grunell
2014/09/25 18:28:38
Done.
| |
443 virtual void RequestMediaAccessPermission( | 444 virtual void RequestMediaAccessPermission( |
444 WebContents* web_contents, | 445 WebContents* web_contents, |
445 const MediaStreamRequest& request, | 446 const MediaStreamRequest& request, |
446 const MediaResponseCallback& callback); | 447 const MediaResponseCallback& callback); |
447 | 448 |
448 // Checks if we have permission to access the microphone or camera. Note that | 449 // Checks if we have permission to access the microphone or camera. Note that |
449 // this does not query the user. |type| must be MEDIA_DEVICE_AUDIO_CAPTURE | 450 // this does not query the user. |type| must be MEDIA_DEVICE_AUDIO_CAPTURE |
450 // or MEDIA_DEVICE_VIDEO_CAPTURE. | 451 // or MEDIA_DEVICE_VIDEO_CAPTURE. |
452 // Delegates that expect this to be ever called, must implement the function. | |
451 virtual bool CheckMediaAccessPermission(WebContents* web_contents, | 453 virtual bool CheckMediaAccessPermission(WebContents* web_contents, |
452 const GURL& security_origin, | 454 const GURL& security_origin, |
453 MediaStreamType type); | 455 MediaStreamType type); |
454 | 456 |
455 // Requests permission to access the PPAPI broker. The delegate should return | 457 // Requests permission to access the PPAPI broker. The delegate should return |
456 // true and call the passed in |callback| with the result, or return false | 458 // true and call the passed in |callback| with the result, or return false |
457 // to indicate that it does not support asking for permission. | 459 // to indicate that it does not support asking for permission. |
458 virtual bool RequestPpapiBrokerPermission( | 460 virtual bool RequestPpapiBrokerPermission( |
459 WebContents* web_contents, | 461 WebContents* web_contents, |
460 const GURL& url, | 462 const GURL& url, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
499 // Called when |this| is no longer the WebContentsDelegate for |source|. | 501 // Called when |this| is no longer the WebContentsDelegate for |source|. |
500 void Detach(WebContents* source); | 502 void Detach(WebContents* source); |
501 | 503 |
502 // The WebContents that this is currently a delegate for. | 504 // The WebContents that this is currently a delegate for. |
503 std::set<WebContents*> attached_contents_; | 505 std::set<WebContents*> attached_contents_; |
504 }; | 506 }; |
505 | 507 |
506 } // namespace content | 508 } // namespace content |
507 | 509 |
508 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 510 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |