| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 virtual void LostCapture() {} | 217 virtual void LostCapture() {} |
| 218 | 218 |
| 219 // Notification that |contents| has gained focus. | 219 // Notification that |contents| has gained focus. |
| 220 virtual void WebContentsFocused(WebContents* contents) {} | 220 virtual void WebContentsFocused(WebContents* contents) {} |
| 221 | 221 |
| 222 // Asks the delegate if the given tab can download. | 222 // Asks the delegate if the given tab can download. |
| 223 virtual bool CanDownload(RenderViewHost* render_view_host, | 223 virtual bool CanDownload(RenderViewHost* render_view_host, |
| 224 int request_id, | 224 int request_id, |
| 225 const std::string& request_method); | 225 const std::string& request_method); |
| 226 | 226 |
| 227 // Notifies the delegate that a download is starting. | |
| 228 virtual void OnStartDownload(WebContents* source, DownloadItem* download) {} | |
| 229 | |
| 230 // Return much extra vertical space should be allotted to the | 227 // Return much extra vertical space should be allotted to the |
| 231 // render view widget during various animations (e.g. infobar closing). | 228 // render view widget during various animations (e.g. infobar closing). |
| 232 // This is used to make painting look smoother. | 229 // This is used to make painting look smoother. |
| 233 virtual int GetExtraRenderViewHeight() const; | 230 virtual int GetExtraRenderViewHeight() const; |
| 234 | 231 |
| 235 // Returns true if the context menu operation was handled by the delegate. | 232 // Returns true if the context menu operation was handled by the delegate. |
| 236 virtual bool HandleContextMenu(const content::ContextMenuParams& params); | 233 virtual bool HandleContextMenu(const content::ContextMenuParams& params); |
| 237 | 234 |
| 238 // Opens source view for given WebContents that is navigated to the given | 235 // Opens source view for given WebContents that is navigated to the given |
| 239 // page url. | 236 // page url. |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 // Called when |this| is no longer the WebContentsDelegate for |source|. | 441 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 445 void Detach(WebContents* source); | 442 void Detach(WebContents* source); |
| 446 | 443 |
| 447 // The WebContents that this is currently a delegate for. | 444 // The WebContents that this is currently a delegate for. |
| 448 std::set<WebContents*> attached_contents_; | 445 std::set<WebContents*> attached_contents_; |
| 449 }; | 446 }; |
| 450 | 447 |
| 451 } // namespace content | 448 } // namespace content |
| 452 | 449 |
| 453 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 450 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |