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

Side by Side Diff: chrome/browser/ui/omnibox/chrome_omnibox_client.cc

Issue 2816353002: Make const versions GetTemplateURLForKeyword, GetTemplateURLForGUID, GetTemplateURLForHost (Closed)
Patch Set: Make definition and declaration order of new functions match Created 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/omnibox/chrome_omnibox_client.h" 5 #include "chrome/browser/ui/omnibox/chrome_omnibox_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 const TemplateURL* template_url = match.GetTemplateURL(service, false); 216 const TemplateURL* template_url = match.GetTemplateURL(service, false);
217 if (template_url && 217 if (template_url &&
218 (template_url->type() == TemplateURL::OMNIBOX_API_EXTENSION)) { 218 (template_url->type() == TemplateURL::OMNIBOX_API_EXTENSION)) {
219 return extensions::OmniboxAPI::Get(profile_)->GetOmniboxIcon( 219 return extensions::OmniboxAPI::Get(profile_)->GetOmniboxIcon(
220 template_url->GetExtensionId()); 220 template_url->GetExtensionId());
221 } 221 }
222 return gfx::Image(); 222 return gfx::Image();
223 } 223 }
224 224
225 bool ChromeOmniboxClient::ProcessExtensionKeyword( 225 bool ChromeOmniboxClient::ProcessExtensionKeyword(
226 TemplateURL* template_url, 226 const TemplateURL* template_url,
227 const AutocompleteMatch& match, 227 const AutocompleteMatch& match,
228 WindowOpenDisposition disposition, 228 WindowOpenDisposition disposition,
229 OmniboxNavigationObserver* observer) { 229 OmniboxNavigationObserver* observer) {
230 if (template_url->type() != TemplateURL::OMNIBOX_API_EXTENSION) 230 if (template_url->type() != TemplateURL::OMNIBOX_API_EXTENSION)
231 return false; 231 return false;
232 232
233 // Strip the keyword + leading space off the input, but don't exceed 233 // Strip the keyword + leading space off the input, but don't exceed
234 // fill_into_edit. An obvious case is that the user may not have entered 234 // fill_into_edit. An obvious case is that the user may not have entered
235 // a leading space and is asking to launch this extension without any 235 // a leading space and is asking to launch this extension without any
236 // additional input. 236 // additional input.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 InstantSearchPrerenderer::GetForProfile(profile_); 496 InstantSearchPrerenderer::GetForProfile(profile_);
497 if (prerenderer) 497 if (prerenderer)
498 prerenderer->Prerender(suggestion); 498 prerenderer->Prerender(suggestion);
499 } 499 }
500 500
501 void ChromeOmniboxClient::OnBitmapFetched(const BitmapFetchedCallback& callback, 501 void ChromeOmniboxClient::OnBitmapFetched(const BitmapFetchedCallback& callback,
502 const SkBitmap& bitmap) { 502 const SkBitmap& bitmap) {
503 request_id_ = BitmapFetcherService::REQUEST_ID_INVALID; 503 request_id_ = BitmapFetcherService::REQUEST_ID_INVALID;
504 callback.Run(bitmap); 504 callback.Run(bitmap);
505 } 505 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/chrome_omnibox_client.h ('k') | chrome/browser/ui/search/instant_search_prerenderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698