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

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

Issue 13037003: permissionrequest API for guest Download. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync @tott Created 7 years, 8 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 | Annotate | Revision Log
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 #include "content/public/browser/web_contents_delegate.h" 5 #include "content/public/browser/web_contents_delegate.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 bool WebContentsDelegate::TakeFocus(WebContents* source, bool reverse) { 64 bool WebContentsDelegate::TakeFocus(WebContents* source, bool reverse) {
65 return false; 65 return false;
66 } 66 }
67 67
68 int WebContentsDelegate::GetExtraRenderViewHeight() const { 68 int WebContentsDelegate::GetExtraRenderViewHeight() const {
69 return 0; 69 return 0;
70 } 70 }
71 71
72 bool WebContentsDelegate::CanDownload(RenderViewHost* render_view_host, 72 void WebContentsDelegate::CanDownload(
73 int request_id, 73 RenderViewHost* render_view_host,
74 const std::string& request_method) { 74 int request_id,
75 return true; 75 const std::string& request_method,
76 const base::Callback<void(bool)>& callback) {
77 callback.Run(true);
76 } 78 }
77 79
78 bool WebContentsDelegate::HandleContextMenu( 80 bool WebContentsDelegate::HandleContextMenu(
79 const content::ContextMenuParams& params) { 81 const content::ContextMenuParams& params) {
80 return false; 82 return false;
81 } 83 }
82 84
83 void WebContentsDelegate::ViewSourceForTab(WebContents* source, 85 void WebContentsDelegate::ViewSourceForTab(WebContents* source,
84 const GURL& page_url) { 86 const GURL& page_url) {
85 // Fall back implementation based entirely on the view-source scheme. 87 // Fall back implementation based entirely on the view-source scheme.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); 161 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end());
160 attached_contents_.insert(web_contents); 162 attached_contents_.insert(web_contents);
161 } 163 }
162 164
163 void WebContentsDelegate::Detach(WebContents* web_contents) { 165 void WebContentsDelegate::Detach(WebContents* web_contents) {
164 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); 166 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end());
165 attached_contents_.erase(web_contents); 167 attached_contents_.erase(web_contents);
166 } 168 }
167 169
168 } // namespace content 170 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_delegate.h ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698