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

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. Created 7 years, 9 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool WebContentsDelegate::CanDownload(RenderViewHost* render_view_host,
73 int request_id, 73 int request_id,
74 const std::string& request_method) { 74 const std::string& request_method) {
75 return true; 75 return true;
76 } 76 }
77 77
78 void WebContentsDelegate::CanDownloadAsync(
79 RenderViewHost* render_view_host,
80 int request_id,
81 const std::string& request_method,
82 const base::Callback<void(bool)>& callback) {
83 callback.Run(true);
84 }
85
78 bool WebContentsDelegate::HandleContextMenu( 86 bool WebContentsDelegate::HandleContextMenu(
79 const content::ContextMenuParams& params) { 87 const content::ContextMenuParams& params) {
80 return false; 88 return false;
81 } 89 }
82 90
83 void WebContentsDelegate::ViewSourceForTab(WebContents* source, 91 void WebContentsDelegate::ViewSourceForTab(WebContents* source,
84 const GURL& page_url) { 92 const GURL& page_url) {
85 // Fall back implementation based entirely on the view-source scheme. 93 // Fall back implementation based entirely on the view-source scheme.
86 // It suffers from http://crbug.com/523 and that is why browser overrides 94 // It suffers from http://crbug.com/523 and that is why browser overrides
87 // it with proper implementation. 95 // it with proper implementation.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); 167 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end());
160 attached_contents_.insert(web_contents); 168 attached_contents_.insert(web_contents);
161 } 169 }
162 170
163 void WebContentsDelegate::Detach(WebContents* web_contents) { 171 void WebContentsDelegate::Detach(WebContents* web_contents) {
164 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); 172 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end());
165 attached_contents_.erase(web_contents); 173 attached_contents_.erase(web_contents);
166 } 174 }
167 175
168 } // namespace content 176 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698