| 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 virtual void MoveValidationMessage(WebContents* web_contents, | 479 virtual void MoveValidationMessage(WebContents* web_contents, |
| 480 const gfx::Rect& anchor_in_root_view) {} | 480 const gfx::Rect& anchor_in_root_view) {} |
| 481 | 481 |
| 482 // Returns true if the WebContents is never visible. | 482 // Returns true if the WebContents is never visible. |
| 483 virtual bool IsNeverVisible(WebContents* web_contents); | 483 virtual bool IsNeverVisible(WebContents* web_contents); |
| 484 | 484 |
| 485 // Called in response to a request to save a frame. If this returns true, the | 485 // Called in response to a request to save a frame. If this returns true, the |
| 486 // default behavior is suppressed. | 486 // default behavior is suppressed. |
| 487 virtual bool SaveFrame(const GURL& url, const Referrer& referrer); | 487 virtual bool SaveFrame(const GURL& url, const Referrer& referrer); |
| 488 | 488 |
| 489 // Can be overridden by a delegate to return the security style of the given | 489 // Can be overridden by a delegate to return the security style of the |
| 490 // |web_contents|. Returns SECURITY_STYLE_UNKNOWN if not overriden. | 490 // given |web_contents|, populating |security_style_explanation| to |
| 491 virtual SecurityStyle GetSecurityStyle(WebContents* web_contents); | 491 // explain why the SecurityStyle was downgraded. Returns |
| 492 // SECURITY_STYLE_UNKNOWN if not overriden. |
| 493 virtual SecurityStyle GetSecurityStyle( |
| 494 WebContents* web_contents, |
| 495 SecurityStyleExplanation* security_style_explanation); |
| 492 | 496 |
| 493 protected: | 497 protected: |
| 494 virtual ~WebContentsDelegate(); | 498 virtual ~WebContentsDelegate(); |
| 495 | 499 |
| 496 private: | 500 private: |
| 497 friend class WebContentsImpl; | 501 friend class WebContentsImpl; |
| 498 | 502 |
| 499 // Called when |this| becomes the WebContentsDelegate for |source|. | 503 // Called when |this| becomes the WebContentsDelegate for |source|. |
| 500 void Attach(WebContents* source); | 504 void Attach(WebContents* source); |
| 501 | 505 |
| 502 // Called when |this| is no longer the WebContentsDelegate for |source|. | 506 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 503 void Detach(WebContents* source); | 507 void Detach(WebContents* source); |
| 504 | 508 |
| 505 // The WebContents that this is currently a delegate for. | 509 // The WebContents that this is currently a delegate for. |
| 506 std::set<WebContents*> attached_contents_; | 510 std::set<WebContents*> attached_contents_; |
| 507 }; | 511 }; |
| 508 | 512 |
| 509 } // namespace content | 513 } // namespace content |
| 510 | 514 |
| 511 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 515 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |