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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 const MediaStreamRequest& request, | 446 const MediaStreamRequest& request, |
447 const MediaResponseCallback& callback); | 447 const MediaResponseCallback& callback); |
448 | 448 |
449 // 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 |
450 // 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 |
451 // or MEDIA_DEVICE_VIDEO_CAPTURE. | 451 // or MEDIA_DEVICE_VIDEO_CAPTURE. |
452 virtual bool CheckMediaAccessPermission(WebContents* web_contents, | 452 virtual bool CheckMediaAccessPermission(WebContents* web_contents, |
453 const GURL& security_origin, | 453 const GURL& security_origin, |
454 MediaStreamType type); | 454 MediaStreamType type); |
455 | 455 |
| 456 #if defined(OS_ANDROID) |
| 457 // Asks permission to decode media stream. After permission is determined, |
| 458 // |callback| will be called with the result. |
| 459 virtual void RequestMediaDecodePermission( |
| 460 WebContents* web_contents, |
| 461 const base::Callback<void(bool)>& callback); |
| 462 #endif |
| 463 |
456 // Requests permission to access the PPAPI broker. The delegate should return | 464 // Requests permission to access the PPAPI broker. The delegate should return |
457 // true and call the passed in |callback| with the result, or return false | 465 // true and call the passed in |callback| with the result, or return false |
458 // to indicate that it does not support asking for permission. | 466 // to indicate that it does not support asking for permission. |
459 virtual bool RequestPpapiBrokerPermission( | 467 virtual bool RequestPpapiBrokerPermission( |
460 WebContents* web_contents, | 468 WebContents* web_contents, |
461 const GURL& url, | 469 const GURL& url, |
462 const base::FilePath& plugin_path, | 470 const base::FilePath& plugin_path, |
463 const base::Callback<void(bool)>& callback); | 471 const base::Callback<void(bool)>& callback); |
464 | 472 |
465 // Returns the size for the new render view created for the pending entry in | 473 // Returns the size for the new render view created for the pending entry in |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 // Called when |this| is no longer the WebContentsDelegate for |source|. | 525 // Called when |this| is no longer the WebContentsDelegate for |source|. |
518 void Detach(WebContents* source); | 526 void Detach(WebContents* source); |
519 | 527 |
520 // The WebContents that this is currently a delegate for. | 528 // The WebContents that this is currently a delegate for. |
521 std::set<WebContents*> attached_contents_; | 529 std::set<WebContents*> attached_contents_; |
522 }; | 530 }; |
523 | 531 |
524 } // namespace content | 532 } // namespace content |
525 | 533 |
526 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 534 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |