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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 // Called when |this| is no longer the WebContentsDelegate for |source|. | 427 // Called when |this| is no longer the WebContentsDelegate for |source|. |
431 void Detach(WebContents* source); | 428 void Detach(WebContents* source); |
432 | 429 |
433 // The WebContents that this is currently a delegate for. | 430 // The WebContents that this is currently a delegate for. |
434 std::set<WebContents*> attached_contents_; | 431 std::set<WebContents*> attached_contents_; |
435 }; | 432 }; |
436 | 433 |
437 } // namespace content | 434 } // namespace content |
438 | 435 |
439 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 436 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |