| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 virtual void NavigationStateChanged(const WebContents* source, | 89 virtual void NavigationStateChanged(const WebContents* source, |
| 90 unsigned changed_flags) {} | 90 unsigned changed_flags) {} |
| 91 | 91 |
| 92 // Adds the navigation request headers to |headers|. Use | 92 // Adds the navigation request headers to |headers|. Use |
| 93 // net::HttpUtil::AppendHeaderIfMissing to build the set of headers. | 93 // net::HttpUtil::AppendHeaderIfMissing to build the set of headers. |
| 94 virtual void AddNavigationHeaders(const GURL& url, std::string* headers) {} | 94 virtual void AddNavigationHeaders(const GURL& url, std::string* headers) {} |
| 95 | 95 |
| 96 // Creates a new tab with the already-created WebContents 'new_contents'. | 96 // Creates a new tab with the already-created WebContents 'new_contents'. |
| 97 // The window for the added contents should be reparented correctly when this | 97 // The window for the added contents should be reparented correctly when this |
| 98 // method returns. If |disposition| is NEW_POPUP, |pos| should hold the | 98 // method returns. If |disposition| is NEW_POPUP, |pos| should hold the |
| 99 // initial position. | 99 // initial position. If |was_blocked| is non-NULL, then |*was_blocked| will |
| 100 // be set to true if the popup gets blocked, and left unchanged otherwise. |
| 100 virtual void AddNewContents(WebContents* source, | 101 virtual void AddNewContents(WebContents* source, |
| 101 WebContents* new_contents, | 102 WebContents* new_contents, |
| 102 WindowOpenDisposition disposition, | 103 WindowOpenDisposition disposition, |
| 103 const gfx::Rect& initial_pos, | 104 const gfx::Rect& initial_pos, |
| 104 bool user_gesture) {} | 105 bool user_gesture, |
| 106 bool* was_blocked) {} |
| 105 | 107 |
| 106 // Selects the specified contents, bringing its container to the front. | 108 // Selects the specified contents, bringing its container to the front. |
| 107 virtual void ActivateContents(WebContents* contents) {} | 109 virtual void ActivateContents(WebContents* contents) {} |
| 108 | 110 |
| 109 // Deactivates the specified contents by deactivating its container and | 111 // Deactivates the specified contents by deactivating its container and |
| 110 // potentialy moving it to the back of the Z order. | 112 // potentialy moving it to the back of the Z order. |
| 111 virtual void DeactivateContents(WebContents* contents) {} | 113 virtual void DeactivateContents(WebContents* contents) {} |
| 112 | 114 |
| 113 // Notifies the delegate that this contents is starting or is done loading | 115 // Notifies the delegate that this contents is starting or is done loading |
| 114 // some resource. The delegate should use this notification to represent | 116 // some resource. The delegate should use this notification to represent |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 // Called when |this| is no longer the WebContentsDelegate for |source|. | 452 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 451 void Detach(WebContents* source); | 453 void Detach(WebContents* source); |
| 452 | 454 |
| 453 // The WebContents that this is currently a delegate for. | 455 // The WebContents that this is currently a delegate for. |
| 454 std::set<WebContents*> attached_contents_; | 456 std::set<WebContents*> attached_contents_; |
| 455 }; | 457 }; |
| 456 | 458 |
| 457 } // namespace content | 459 } // namespace content |
| 458 | 460 |
| 459 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 461 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |