Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: content/public/browser/web_contents_delegate.h

Issue 286543002: Cleanup CanDownload WebContentsDelegate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Android build hopefully Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 // Invoked when the page loses mouse capture. 220 // Invoked when the page loses mouse capture.
221 virtual void LostCapture() {} 221 virtual void LostCapture() {}
222 222
223 // Notification that |contents| has gained focus. 223 // Notification that |contents| has gained focus.
224 virtual void WebContentsFocused(WebContents* contents) {} 224 virtual void WebContentsFocused(WebContents* contents) {}
225 225
226 // Asks the delegate if the given tab can download. 226 // Asks the delegate if the given tab can download.
227 // Invoking the |callback| synchronously is OK. 227 // Invoking the |callback| synchronously is OK.
228 virtual void CanDownload(RenderViewHost* render_view_host, 228 virtual void CanDownload(RenderViewHost* render_view_host,
229 int request_id, 229 const GURL& url,
230 const std::string& request_method, 230 const std::string& request_method,
231 const base::Callback<void(bool)>& callback); 231 const base::Callback<void(bool)>& callback);
232 232
233 // Return much extra vertical space should be allotted to the 233 // Return much extra vertical space should be allotted to the
234 // render view widget during various animations (e.g. infobar closing). 234 // render view widget during various animations (e.g. infobar closing).
235 // This is used to make painting look smoother. 235 // This is used to make painting look smoother.
236 virtual int GetExtraRenderViewHeight() const; 236 virtual int GetExtraRenderViewHeight() const;
237 237
238 // Returns true if the context menu operation was handled by the delegate. 238 // Returns true if the context menu operation was handled by the delegate.
239 virtual bool HandleContextMenu(const content::ContextMenuParams& params); 239 virtual bool HandleContextMenu(const content::ContextMenuParams& params);
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 // Called when |this| is no longer the WebContentsDelegate for |source|. 479 // Called when |this| is no longer the WebContentsDelegate for |source|.
480 void Detach(WebContents* source); 480 void Detach(WebContents* source);
481 481
482 // The WebContents that this is currently a delegate for. 482 // The WebContents that this is currently a delegate for.
483 std::set<WebContents*> attached_contents_; 483 std::set<WebContents*> attached_contents_;
484 }; 484 };
485 485
486 } // namespace content 486 } // namespace content
487 487
488 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 488 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/public/browser/web_contents_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698