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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 namespace gfx { | 59 namespace gfx { |
60 class Point; | 60 class Point; |
61 class Rect; | 61 class Rect; |
62 class Size; | 62 class Size; |
63 } | 63 } |
64 | 64 |
65 namespace net { | 65 namespace net { |
66 class X509Certificate; | 66 class X509Certificate; |
67 } | 67 } |
68 | 68 |
| 69 namespace url { |
| 70 class Origin; |
| 71 } |
| 72 |
69 namespace blink { | 73 namespace blink { |
70 class WebGestureEvent; | 74 class WebGestureEvent; |
71 } | 75 } |
72 | 76 |
73 namespace content { | 77 namespace content { |
74 | 78 |
75 struct OpenURLParams; | 79 struct OpenURLParams; |
76 struct WebContentsUnresponsiveState; | 80 struct WebContentsUnresponsiveState; |
77 | 81 |
78 // Objects implement this interface to get notified about changes in the | 82 // Objects implement this interface to get notified about changes in the |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 SecurityStyleExplanations* security_style_explanations); | 552 SecurityStyleExplanations* security_style_explanations); |
549 | 553 |
550 // Displays platform-specific (OS) dialog with the certificate details. | 554 // Displays platform-specific (OS) dialog with the certificate details. |
551 virtual void ShowCertificateViewerInDevTools( | 555 virtual void ShowCertificateViewerInDevTools( |
552 WebContents* web_contents, | 556 WebContents* web_contents, |
553 scoped_refptr<net::X509Certificate> certificate); | 557 scoped_refptr<net::X509Certificate> certificate); |
554 | 558 |
555 // Requests the app banner. This method is called from the DevTools. | 559 // Requests the app banner. This method is called from the DevTools. |
556 virtual void RequestAppBannerFromDevTools(content::WebContents* web_contents); | 560 virtual void RequestAppBannerFromDevTools(content::WebContents* web_contents); |
557 | 561 |
| 562 // Reports that passive mixed content was found at the specified url. |
| 563 virtual void PassiveInsecureContentFound(const GURL& resource_url) {} |
| 564 |
| 565 // Checks if running of active mixed content is allowed for the specified |
| 566 // WebContents/tab. |
| 567 virtual bool ShouldAllowRunningInsecureContent(WebContents* web_contents, |
| 568 bool allowed_per_prefs, |
| 569 const url::Origin& origin, |
| 570 const GURL& resource_url); |
| 571 |
558 protected: | 572 protected: |
559 virtual ~WebContentsDelegate(); | 573 virtual ~WebContentsDelegate(); |
560 | 574 |
561 private: | 575 private: |
562 friend class WebContentsImpl; | 576 friend class WebContentsImpl; |
563 | 577 |
564 // Called when |this| becomes the WebContentsDelegate for |source|. | 578 // Called when |this| becomes the WebContentsDelegate for |source|. |
565 void Attach(WebContents* source); | 579 void Attach(WebContents* source); |
566 | 580 |
567 // Called when |this| is no longer the WebContentsDelegate for |source|. | 581 // Called when |this| is no longer the WebContentsDelegate for |source|. |
568 void Detach(WebContents* source); | 582 void Detach(WebContents* source); |
569 | 583 |
570 // The WebContents that this is currently a delegate for. | 584 // The WebContents that this is currently a delegate for. |
571 std::set<WebContents*> attached_contents_; | 585 std::set<WebContents*> attached_contents_; |
572 }; | 586 }; |
573 | 587 |
574 } // namespace content | 588 } // namespace content |
575 | 589 |
576 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 590 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |