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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 struct SecurityStyleExplanations; | 54 struct SecurityStyleExplanations; |
55 struct SSLStatus; | 55 struct SSLStatus; |
56 } | 56 } |
57 | 57 |
58 namespace gfx { | 58 namespace gfx { |
59 class Point; | 59 class Point; |
60 class Rect; | 60 class Rect; |
61 class Size; | 61 class Size; |
62 } | 62 } |
63 | 63 |
| 64 namespace net { |
| 65 class X509Certificate; |
| 66 } |
| 67 |
64 namespace url { | 68 namespace url { |
65 class Origin; | 69 class Origin; |
66 } | 70 } |
67 | 71 |
68 namespace blink { | 72 namespace blink { |
69 class WebGestureEvent; | 73 class WebGestureEvent; |
70 } | 74 } |
71 | 75 |
72 namespace content { | 76 namespace content { |
73 class RenderWidgetHost; | 77 class RenderWidgetHost; |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 // given |web_contents|, populating |security_style_explanations| to | 515 // given |web_contents|, populating |security_style_explanations| to |
512 // explain why the SecurityStyle was downgraded. Returns | 516 // explain why the SecurityStyle was downgraded. Returns |
513 // SECURITY_STYLE_UNKNOWN if not overriden. | 517 // SECURITY_STYLE_UNKNOWN if not overriden. |
514 virtual SecurityStyle GetSecurityStyle( | 518 virtual SecurityStyle GetSecurityStyle( |
515 WebContents* web_contents, | 519 WebContents* web_contents, |
516 SecurityStyleExplanations* security_style_explanations); | 520 SecurityStyleExplanations* security_style_explanations); |
517 | 521 |
518 // Displays platform-specific (OS) dialog with the certificate details. | 522 // Displays platform-specific (OS) dialog with the certificate details. |
519 virtual void ShowCertificateViewerInDevTools( | 523 virtual void ShowCertificateViewerInDevTools( |
520 WebContents* web_contents, | 524 WebContents* web_contents, |
521 int cert_id); | 525 scoped_refptr<net::X509Certificate> certificate); |
522 | 526 |
523 // Called when the active render widget is forwarding a RemoteChannel | 527 // Called when the active render widget is forwarding a RemoteChannel |
524 // compositor proto. This is used in Blimp mode. | 528 // compositor proto. This is used in Blimp mode. |
525 virtual void ForwardCompositorProto( | 529 virtual void ForwardCompositorProto( |
526 RenderWidgetHost* render_widget_host, | 530 RenderWidgetHost* render_widget_host, |
527 const std::vector<uint8_t>& proto) {} | 531 const std::vector<uint8_t>& proto) {} |
528 | 532 |
529 // Requests the app banner. This method is called from the DevTools. | 533 // Requests the app banner. This method is called from the DevTools. |
530 virtual void RequestAppBannerFromDevTools(content::WebContents* web_contents); | 534 virtual void RequestAppBannerFromDevTools(content::WebContents* web_contents); |
531 | 535 |
532 protected: | 536 protected: |
533 virtual ~WebContentsDelegate(); | 537 virtual ~WebContentsDelegate(); |
534 | 538 |
535 private: | 539 private: |
536 friend class WebContentsImpl; | 540 friend class WebContentsImpl; |
537 | 541 |
538 // Called when |this| becomes the WebContentsDelegate for |source|. | 542 // Called when |this| becomes the WebContentsDelegate for |source|. |
539 void Attach(WebContents* source); | 543 void Attach(WebContents* source); |
540 | 544 |
541 // Called when |this| is no longer the WebContentsDelegate for |source|. | 545 // Called when |this| is no longer the WebContentsDelegate for |source|. |
542 void Detach(WebContents* source); | 546 void Detach(WebContents* source); |
543 | 547 |
544 // The WebContents that this is currently a delegate for. | 548 // The WebContents that this is currently a delegate for. |
545 std::set<WebContents*> attached_contents_; | 549 std::set<WebContents*> attached_contents_; |
546 }; | 550 }; |
547 | 551 |
548 } // namespace content | 552 } // namespace content |
549 | 553 |
550 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 554 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |