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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 bool ChromeOmniboxClient::IsHomePage(const std::string& url) const { | 183 bool ChromeOmniboxClient::IsHomePage(const std::string& url) const { |
184 return url == profile_->GetPrefs()->GetString(prefs::kHomePage); | 184 return url == profile_->GetPrefs()->GetString(prefs::kHomePage); |
185 } | 185 } |
186 | 186 |
187 const SessionID& ChromeOmniboxClient::GetSessionID() const { | 187 const SessionID& ChromeOmniboxClient::GetSessionID() const { |
188 return SessionTabHelper::FromWebContents( | 188 return SessionTabHelper::FromWebContents( |
189 controller_->GetWebContents())->session_id(); | 189 controller_->GetWebContents())->session_id(); |
190 } | 190 } |
191 | 191 |
192 bookmarks::BookmarkModel* ChromeOmniboxClient::GetBookmarkModel() { | 192 bookmarks::BookmarkModel* ChromeOmniboxClient::GetBookmarkModel() { |
193 return BookmarkModelFactory::GetForProfile(profile_); | 193 return BookmarkModelFactory::GetForBrowserContext(profile_); |
194 } | 194 } |
195 | 195 |
196 TemplateURLService* ChromeOmniboxClient::GetTemplateURLService() { | 196 TemplateURLService* ChromeOmniboxClient::GetTemplateURLService() { |
197 return TemplateURLServiceFactory::GetForProfile(profile_); | 197 return TemplateURLServiceFactory::GetForProfile(profile_); |
198 } | 198 } |
199 | 199 |
200 const AutocompleteSchemeClassifier& | 200 const AutocompleteSchemeClassifier& |
201 ChromeOmniboxClient::GetSchemeClassifier() const { | 201 ChromeOmniboxClient::GetSchemeClassifier() const { |
202 return scheme_classifier_; | 202 return scheme_classifier_; |
203 } | 203 } |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 InstantSearchPrerenderer::GetForProfile(profile_); | 451 InstantSearchPrerenderer::GetForProfile(profile_); |
452 if (prerenderer) | 452 if (prerenderer) |
453 prerenderer->Prerender(suggestion); | 453 prerenderer->Prerender(suggestion); |
454 } | 454 } |
455 | 455 |
456 void ChromeOmniboxClient::OnBitmapFetched(const BitmapFetchedCallback& callback, | 456 void ChromeOmniboxClient::OnBitmapFetched(const BitmapFetchedCallback& callback, |
457 const SkBitmap& bitmap) { | 457 const SkBitmap& bitmap) { |
458 request_id_ = BitmapFetcherService::REQUEST_ID_INVALID; | 458 request_id_ = BitmapFetcherService::REQUEST_ID_INVALID; |
459 callback.Run(bitmap); | 459 callback.Run(bitmap); |
460 } | 460 } |
OLD | NEW |