| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 } | 55 } |
| 56 | 56 |
| 57 namespace blink { | 57 namespace blink { |
| 58 class WebGestureEvent; | 58 class WebGestureEvent; |
| 59 class WebLayer; | 59 class WebLayer; |
| 60 struct WebWindowFeatures; | 60 struct WebWindowFeatures; |
| 61 } | 61 } |
| 62 | 62 |
| 63 namespace content { | 63 namespace content { |
| 64 | 64 |
| 65 class DevToolsAgentHost; |
| 65 struct OpenURLParams; | 66 struct OpenURLParams; |
| 66 | 67 |
| 67 // Objects implement this interface to get notified about changes in the | 68 // Objects implement this interface to get notified about changes in the |
| 68 // WebContents and to provide necessary functionality. | 69 // WebContents and to provide necessary functionality. |
| 69 class CONTENT_EXPORT WebContentsDelegate { | 70 class CONTENT_EXPORT WebContentsDelegate { |
| 70 public: | 71 public: |
| 71 WebContentsDelegate(); | 72 WebContentsDelegate(); |
| 72 | 73 |
| 73 // Opens a new URL inside the passed in WebContents (if source is 0 open | 74 // Opens a new URL inside the passed in WebContents (if source is 0 open |
| 74 // in the current front-most tab), unless |disposition| indicates the url | 75 // in the current front-most tab), unless |disposition| indicates the url |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 virtual void HideValidationMessage(WebContents* web_contents) {} | 462 virtual void HideValidationMessage(WebContents* web_contents) {} |
| 462 | 463 |
| 463 // Notification that the form element that triggered the validation failure | 464 // Notification that the form element that triggered the validation failure |
| 464 // has moved. | 465 // has moved. |
| 465 virtual void MoveValidationMessage(WebContents* web_contents, | 466 virtual void MoveValidationMessage(WebContents* web_contents, |
| 466 const gfx::Rect& anchor_in_root_view) {} | 467 const gfx::Rect& anchor_in_root_view) {} |
| 467 | 468 |
| 468 // Returns true if the WebContents is never visible. | 469 // Returns true if the WebContents is never visible. |
| 469 virtual bool IsNeverVisible(WebContents* web_contents); | 470 virtual bool IsNeverVisible(WebContents* web_contents); |
| 470 | 471 |
| 472 virtual void InspectWorker(DevToolsAgentHost* agent_host) {} |
| 473 |
| 471 protected: | 474 protected: |
| 472 virtual ~WebContentsDelegate(); | 475 virtual ~WebContentsDelegate(); |
| 473 | 476 |
| 474 private: | 477 private: |
| 475 friend class WebContentsImpl; | 478 friend class WebContentsImpl; |
| 476 | 479 |
| 477 // Called when |this| becomes the WebContentsDelegate for |source|. | 480 // Called when |this| becomes the WebContentsDelegate for |source|. |
| 478 void Attach(WebContents* source); | 481 void Attach(WebContents* source); |
| 479 | 482 |
| 480 // Called when |this| is no longer the WebContentsDelegate for |source|. | 483 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 481 void Detach(WebContents* source); | 484 void Detach(WebContents* source); |
| 482 | 485 |
| 483 // The WebContents that this is currently a delegate for. | 486 // The WebContents that this is currently a delegate for. |
| 484 std::set<WebContents*> attached_contents_; | 487 std::set<WebContents*> attached_contents_; |
| 485 }; | 488 }; |
| 486 | 489 |
| 487 } // namespace content | 490 } // namespace content |
| 488 | 491 |
| 489 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 492 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |