| OLD | NEW |
| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 bool ChromeOmniboxClient::IsHomePage(const std::string& url) const { | 192 bool ChromeOmniboxClient::IsHomePage(const std::string& url) const { |
| 193 return url == profile_->GetPrefs()->GetString(prefs::kHomePage); | 193 return url == profile_->GetPrefs()->GetString(prefs::kHomePage); |
| 194 } | 194 } |
| 195 | 195 |
| 196 const SessionID& ChromeOmniboxClient::GetSessionID() const { | 196 const SessionID& ChromeOmniboxClient::GetSessionID() const { |
| 197 return SessionTabHelper::FromWebContents( | 197 return SessionTabHelper::FromWebContents( |
| 198 controller_->GetWebContents())->session_id(); | 198 controller_->GetWebContents())->session_id(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 bookmarks::BookmarkModel* ChromeOmniboxClient::GetBookmarkModel() { | 201 bookmarks::BookmarkModel* ChromeOmniboxClient::GetBookmarkModel() { |
| 202 return BookmarkModelFactory::GetForProfile(profile_); | 202 return BookmarkModelFactory::GetForBrowserContext(profile_); |
| 203 } | 203 } |
| 204 | 204 |
| 205 TemplateURLService* ChromeOmniboxClient::GetTemplateURLService() { | 205 TemplateURLService* ChromeOmniboxClient::GetTemplateURLService() { |
| 206 return TemplateURLServiceFactory::GetForProfile(profile_); | 206 return TemplateURLServiceFactory::GetForProfile(profile_); |
| 207 } | 207 } |
| 208 | 208 |
| 209 const AutocompleteSchemeClassifier& | 209 const AutocompleteSchemeClassifier& |
| 210 ChromeOmniboxClient::GetSchemeClassifier() const { | 210 ChromeOmniboxClient::GetSchemeClassifier() const { |
| 211 return scheme_classifier_; | 211 return scheme_classifier_; |
| 212 } | 212 } |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 InstantSearchPrerenderer::GetForProfile(profile_); | 461 InstantSearchPrerenderer::GetForProfile(profile_); |
| 462 if (prerenderer) | 462 if (prerenderer) |
| 463 prerenderer->Prerender(suggestion); | 463 prerenderer->Prerender(suggestion); |
| 464 } | 464 } |
| 465 | 465 |
| 466 void ChromeOmniboxClient::OnBitmapFetched(const BitmapFetchedCallback& callback, | 466 void ChromeOmniboxClient::OnBitmapFetched(const BitmapFetchedCallback& callback, |
| 467 const SkBitmap& bitmap) { | 467 const SkBitmap& bitmap) { |
| 468 request_id_ = BitmapFetcherService::REQUEST_ID_INVALID; | 468 request_id_ = BitmapFetcherService::REQUEST_ID_INVALID; |
| 469 callback.Run(bitmap); | 469 callback.Run(bitmap); |
| 470 } | 470 } |
| OLD | NEW |