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