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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
216 // Invoked when the page loses mouse capture. | 216 // Invoked when the page loses mouse capture. |
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 virtual void CanDownloadAsync(RenderViewHost* render_view_host, | |
asanka
2013/03/25 18:15:11
Why are you adding another callback instead of mak
lazyboy
2013/03/25 18:36:40
I was worried of slowing down !IsGuest() case (whi
asanka
2013/03/25 18:58:11
Yes. The delegate can always invoke the callback s
lazyboy
2013/03/25 20:13:05
Changed back to single CanDownload() function.
Don
| |
227 int request_id, | |
228 const std::string& request_method, | |
229 const base::Callback<void(bool)>& callback); | |
226 | 230 |
227 // Return much extra vertical space should be allotted to the | 231 // Return much extra vertical space should be allotted to the |
228 // render view widget during various animations (e.g. infobar closing). | 232 // render view widget during various animations (e.g. infobar closing). |
229 // This is used to make painting look smoother. | 233 // This is used to make painting look smoother. |
230 virtual int GetExtraRenderViewHeight() const; | 234 virtual int GetExtraRenderViewHeight() const; |
231 | 235 |
232 // Returns true if the context menu operation was handled by the delegate. | 236 // Returns true if the context menu operation was handled by the delegate. |
233 virtual bool HandleContextMenu(const content::ContextMenuParams& params); | 237 virtual bool HandleContextMenu(const content::ContextMenuParams& params); |
234 | 238 |
235 // Opens source view for given WebContents that is navigated to the given | 239 // Opens source view for given WebContents that is navigated to the given |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
428 // Called when |this| is no longer the WebContentsDelegate for |source|. | 432 // Called when |this| is no longer the WebContentsDelegate for |source|. |
429 void Detach(WebContents* source); | 433 void Detach(WebContents* source); |
430 | 434 |
431 // The WebContents that this is currently a delegate for. | 435 // The WebContents that this is currently a delegate for. |
432 std::set<WebContents*> attached_contents_; | 436 std::set<WebContents*> attached_contents_; |
433 }; | 437 }; |
434 | 438 |
435 } // namespace content | 439 } // namespace content |
436 | 440 |
437 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 441 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |