| 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 virtual bool SaveFrame(const GURL& url, const Referrer& referrer); | 493 virtual bool SaveFrame(const GURL& url, const Referrer& referrer); |
| 494 | 494 |
| 495 // Can be overridden by a delegate to return the security style of the | 495 // Can be overridden by a delegate to return the security style of the |
| 496 // given |web_contents|, populating |security_style_explanations| to | 496 // given |web_contents|, populating |security_style_explanations| to |
| 497 // explain why the SecurityStyle was downgraded. Returns | 497 // explain why the SecurityStyle was downgraded. Returns |
| 498 // SECURITY_STYLE_UNKNOWN if not overriden. | 498 // SECURITY_STYLE_UNKNOWN if not overriden. |
| 499 virtual SecurityStyle GetSecurityStyle( | 499 virtual SecurityStyle GetSecurityStyle( |
| 500 WebContents* web_contents, | 500 WebContents* web_contents, |
| 501 SecurityStyleExplanations* security_style_explanations); | 501 SecurityStyleExplanations* security_style_explanations); |
| 502 | 502 |
| 503 // Displays platform-specific (OS) dialog with the certificate details. |
| 504 virtual void ShowCertificateViewerInDevTools( |
| 505 WebContents* web_contents, |
| 506 int cert_id); |
| 507 |
| 503 protected: | 508 protected: |
| 504 virtual ~WebContentsDelegate(); | 509 virtual ~WebContentsDelegate(); |
| 505 | 510 |
| 506 private: | 511 private: |
| 507 friend class WebContentsImpl; | 512 friend class WebContentsImpl; |
| 508 | 513 |
| 509 // Called when |this| becomes the WebContentsDelegate for |source|. | 514 // Called when |this| becomes the WebContentsDelegate for |source|. |
| 510 void Attach(WebContents* source); | 515 void Attach(WebContents* source); |
| 511 | 516 |
| 512 // Called when |this| is no longer the WebContentsDelegate for |source|. | 517 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 513 void Detach(WebContents* source); | 518 void Detach(WebContents* source); |
| 514 | 519 |
| 515 // The WebContents that this is currently a delegate for. | 520 // The WebContents that this is currently a delegate for. |
| 516 std::set<WebContents*> attached_contents_; | 521 std::set<WebContents*> attached_contents_; |
| 517 }; | 522 }; |
| 518 | 523 |
| 519 } // namespace content | 524 } // namespace content |
| 520 | 525 |
| 521 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 526 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |