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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 208 |
209 // Sets focus to the location bar or some other place that is appropriate. | 209 // Sets focus to the location bar or some other place that is appropriate. |
210 // This is called when the tab wants to encourage user input, like for the | 210 // This is called when the tab wants to encourage user input, like for the |
211 // new tab page. | 211 // new tab page. |
212 virtual void SetFocusToLocationBar(bool select_all) {} | 212 virtual void SetFocusToLocationBar(bool select_all) {} |
213 | 213 |
214 // Returns whether the page should be focused when transitioning from crashed | 214 // Returns whether the page should be focused when transitioning from crashed |
215 // to live. Default is true. | 215 // to live. Default is true. |
216 virtual bool ShouldFocusPageAfterCrash(); | 216 virtual bool ShouldFocusPageAfterCrash(); |
217 | 217 |
| 218 // Returns whether the page should resume accepting requests for the new |
| 219 // window. This is used when window creation is asynchronous |
| 220 // and the navigations need to be delayed. Default is true. |
| 221 virtual bool ShouldResumeRequestsForCreatedWindow(); |
| 222 |
218 // This is called when WebKit tells us that it is done tabbing through | 223 // This is called when WebKit tells us that it is done tabbing through |
219 // controls on the page. Provides a way for WebContentsDelegates to handle | 224 // controls on the page. Provides a way for WebContentsDelegates to handle |
220 // this. Returns true if the delegate successfully handled it. | 225 // this. Returns true if the delegate successfully handled it. |
221 virtual bool TakeFocus(WebContents* source, | 226 virtual bool TakeFocus(WebContents* source, |
222 bool reverse); | 227 bool reverse); |
223 | 228 |
224 // Invoked when the page loses mouse capture. | 229 // Invoked when the page loses mouse capture. |
225 virtual void LostCapture() {} | 230 virtual void LostCapture() {} |
226 | 231 |
227 // Asks the delegate if the given tab can download. | 232 // Asks the delegate if the given tab can download. |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 // Called when |this| is no longer the WebContentsDelegate for |source|. | 498 // Called when |this| is no longer the WebContentsDelegate for |source|. |
494 void Detach(WebContents* source); | 499 void Detach(WebContents* source); |
495 | 500 |
496 // The WebContents that this is currently a delegate for. | 501 // The WebContents that this is currently a delegate for. |
497 std::set<WebContents*> attached_contents_; | 502 std::set<WebContents*> attached_contents_; |
498 }; | 503 }; |
499 | 504 |
500 } // namespace content | 505 } // namespace content |
501 | 506 |
502 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 507 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |