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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 // granted, a call should be made to |callback| with the devices. If the | 412 // granted, a call should be made to |callback| with the devices. If the |
413 // request is denied, a call should be made to |callback| with an empty list | 413 // request is denied, a call should be made to |callback| with an empty list |
414 // of devices. |request| has the details of the request (e.g. which of audio | 414 // of devices. |request| has the details of the request (e.g. which of audio |
415 // and/or video devices are requested, and lists of available devices). | 415 // and/or video devices are requested, and lists of available devices). |
416 virtual void RequestMediaAccessPermission( | 416 virtual void RequestMediaAccessPermission( |
417 WebContents* web_contents, | 417 WebContents* web_contents, |
418 const MediaStreamRequest* request, | 418 const MediaStreamRequest* request, |
419 const MediaResponseCallback& callback) {} | 419 const MediaResponseCallback& callback) {} |
420 | 420 |
421 #if defined(OS_ANDROID) | 421 #if defined(OS_ANDROID) |
422 // Returns true if the delegate wants to handle the url instead. Default | |
423 // returns false. | |
424 virtual bool ShouldOverrideLoading(const GURL& url); | |
425 | |
426 // Called when a compositing layer becomes available for this web contents | 422 // Called when a compositing layer becomes available for this web contents |
427 // so the delegate can add it to the layer tree. | 423 // so the delegate can add it to the layer tree. |
428 virtual void AttachLayer(WebContents* web_contents, | 424 virtual void AttachLayer(WebContents* web_contents, |
429 WebKit::WebLayer* layer) {} | 425 WebKit::WebLayer* layer) {} |
430 | 426 |
431 // Called before a compositing layer becomes invalid so the delegate can | 427 // Called before a compositing layer becomes invalid so the delegate can |
432 // remove it from the layer tree. | 428 // remove it from the layer tree. |
433 virtual void RemoveLayer(WebContents* web_contents, | 429 virtual void RemoveLayer(WebContents* web_contents, |
434 WebKit::WebLayer* layer) {} | 430 WebKit::WebLayer* layer) {} |
435 #endif | 431 #endif |
(...skipping 10 matching lines...) Expand all Loading... |
446 // Called when |this| is no longer the WebContentsDelegate for |source|. | 442 // Called when |this| is no longer the WebContentsDelegate for |source|. |
447 void Detach(WebContents* source); | 443 void Detach(WebContents* source); |
448 | 444 |
449 // The WebContents that this is currently a delegate for. | 445 // The WebContents that this is currently a delegate for. |
450 std::set<WebContents*> attached_contents_; | 446 std::set<WebContents*> attached_contents_; |
451 }; | 447 }; |
452 | 448 |
453 } // namespace content | 449 } // namespace content |
454 | 450 |
455 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 451 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |