OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/ui/search/instant_loader.h" | 5 #include "chrome/browser/ui/search/instant_loader.h" |
6 | 6 |
7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" | 8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" |
9 #include "chrome/browser/favicon/favicon_tab_helper.h" | 9 #include "chrome/browser/favicon/favicon_tab_helper.h" |
10 #include "chrome/browser/history/history_tab_helper.h" | 10 #include "chrome/browser/history/history_tab_helper.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 } | 188 } |
189 | 189 |
190 void InstantLoader::LostCapture() { | 190 void InstantLoader::LostCapture() { |
191 delegate_->OnMouseUp(); | 191 delegate_->OnMouseUp(); |
192 } | 192 } |
193 | 193 |
194 void InstantLoader::WebContentsFocused(content::WebContents* /* contents */) { | 194 void InstantLoader::WebContentsFocused(content::WebContents* /* contents */) { |
195 delegate_->OnFocus(); | 195 delegate_->OnFocus(); |
196 } | 196 } |
197 | 197 |
198 bool InstantLoader::CanDownload(content::RenderViewHost* /* render_view_host */, | 198 void InstantLoader::CanDownload(content::RenderViewHost* /* render_view_host */, |
199 int /* request_id */, | 199 int /* request_id */, |
200 const std::string& /* request_method */) { | 200 const std::string& /* request_method */, |
| 201 const base::Callback<void(bool)>& callback) { |
201 // Downloads are disabled. | 202 // Downloads are disabled. |
202 return false; | 203 callback.Run(false); |
203 } | 204 } |
204 | 205 |
205 void InstantLoader::HandleMouseDown() { | 206 void InstantLoader::HandleMouseDown() { |
206 delegate_->OnMouseDown(); | 207 delegate_->OnMouseDown(); |
207 } | 208 } |
208 | 209 |
209 void InstantLoader::HandleMouseUp() { | 210 void InstantLoader::HandleMouseUp() { |
210 delegate_->OnMouseUp(); | 211 delegate_->OnMouseUp(); |
211 } | 212 } |
212 | 213 |
(...skipping 14 matching lines...) Expand all Loading... |
227 | 228 |
228 bool InstantLoader::OnGoToEntryOffset(int /* offset */) { | 229 bool InstantLoader::OnGoToEntryOffset(int /* offset */) { |
229 return false; | 230 return false; |
230 } | 231 } |
231 | 232 |
232 content::WebContents* InstantLoader::OpenURLFromTab( | 233 content::WebContents* InstantLoader::OpenURLFromTab( |
233 content::WebContents* source, | 234 content::WebContents* source, |
234 const content::OpenURLParams& params) { | 235 const content::OpenURLParams& params) { |
235 return delegate_->OpenURLFromTab(source, params); | 236 return delegate_->OpenURLFromTab(source, params); |
236 } | 237 } |
OLD | NEW |