| 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 virtual void HideValidationMessage(WebContents* web_contents) {} | 460 virtual void HideValidationMessage(WebContents* web_contents) {} |
| 461 | 461 |
| 462 // Notification that the form element that triggered the validation failure | 462 // Notification that the form element that triggered the validation failure |
| 463 // has moved. | 463 // has moved. |
| 464 virtual void MoveValidationMessage(WebContents* web_contents, | 464 virtual void MoveValidationMessage(WebContents* web_contents, |
| 465 const gfx::Rect& anchor_in_root_view) {} | 465 const gfx::Rect& anchor_in_root_view) {} |
| 466 | 466 |
| 467 // Returns true if the WebContents is never visible. | 467 // Returns true if the WebContents is never visible. |
| 468 virtual bool IsNeverVisible(WebContents* web_contents); | 468 virtual bool IsNeverVisible(WebContents* web_contents); |
| 469 | 469 |
| 470 // Notification that a frame's name has changed. Note that this is only |
| 471 // reported if the report_frame_name_changes flag is on in |
| 472 // RendererPreferences. |
| 473 virtual void FrameNameChanged(int render_frame_id, |
| 474 bool is_top_level, |
| 475 const std::string& name) {} |
| 476 |
| 470 protected: | 477 protected: |
| 471 virtual ~WebContentsDelegate(); | 478 virtual ~WebContentsDelegate(); |
| 472 | 479 |
| 473 private: | 480 private: |
| 474 friend class WebContentsImpl; | 481 friend class WebContentsImpl; |
| 475 | 482 |
| 476 // Called when |this| becomes the WebContentsDelegate for |source|. | 483 // Called when |this| becomes the WebContentsDelegate for |source|. |
| 477 void Attach(WebContents* source); | 484 void Attach(WebContents* source); |
| 478 | 485 |
| 479 // Called when |this| is no longer the WebContentsDelegate for |source|. | 486 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 480 void Detach(WebContents* source); | 487 void Detach(WebContents* source); |
| 481 | 488 |
| 482 // The WebContents that this is currently a delegate for. | 489 // The WebContents that this is currently a delegate for. |
| 483 std::set<WebContents*> attached_contents_; | 490 std::set<WebContents*> attached_contents_; |
| 484 }; | 491 }; |
| 485 | 492 |
| 486 } // namespace content | 493 } // namespace content |
| 487 | 494 |
| 488 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 495 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |