| 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 virtual void HideValidationMessage(WebContents* web_contents) {} | 480 virtual void HideValidationMessage(WebContents* web_contents) {} |
| 481 | 481 |
| 482 // Notification that the form element that triggered the validation failure | 482 // Notification that the form element that triggered the validation failure |
| 483 // has moved. | 483 // has moved. |
| 484 virtual void MoveValidationMessage(WebContents* web_contents, | 484 virtual void MoveValidationMessage(WebContents* web_contents, |
| 485 const gfx::Rect& anchor_in_root_view) {} | 485 const gfx::Rect& anchor_in_root_view) {} |
| 486 | 486 |
| 487 // Returns true if the WebContents is never visible. | 487 // Returns true if the WebContents is never visible. |
| 488 virtual bool IsNeverVisible(WebContents* web_contents); | 488 virtual bool IsNeverVisible(WebContents* web_contents); |
| 489 | 489 |
| 490 // Called in response to a request to save a frame. If this returns true, the |
| 491 // default behavior is suppressed. |
| 492 virtual bool SaveFrame(const GURL& url, const Referrer& referrer); |
| 493 |
| 490 protected: | 494 protected: |
| 491 virtual ~WebContentsDelegate(); | 495 virtual ~WebContentsDelegate(); |
| 492 | 496 |
| 493 private: | 497 private: |
| 494 friend class WebContentsImpl; | 498 friend class WebContentsImpl; |
| 495 | 499 |
| 496 // Called when |this| becomes the WebContentsDelegate for |source|. | 500 // Called when |this| becomes the WebContentsDelegate for |source|. |
| 497 void Attach(WebContents* source); | 501 void Attach(WebContents* source); |
| 498 | 502 |
| 499 // Called when |this| is no longer the WebContentsDelegate for |source|. | 503 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 500 void Detach(WebContents* source); | 504 void Detach(WebContents* source); |
| 501 | 505 |
| 502 // The WebContents that this is currently a delegate for. | 506 // The WebContents that this is currently a delegate for. |
| 503 std::set<WebContents*> attached_contents_; | 507 std::set<WebContents*> attached_contents_; |
| 504 }; | 508 }; |
| 505 | 509 |
| 506 } // namespace content | 510 } // namespace content |
| 507 | 511 |
| 508 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 512 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |