| 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/browser_instant_controller.h" | 5 #include "chrome/browser/ui/browser_instant_controller.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/prefs/pref_registry_syncable.h" | 9 #include "chrome/browser/prefs/pref_registry_syncable.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 const GURL& url, | 222 const GURL& url, |
| 223 content::PageTransition transition, | 223 content::PageTransition transition, |
| 224 WindowOpenDisposition disposition) { | 224 WindowOpenDisposition disposition) { |
| 225 browser_->OpenURL(content::OpenURLParams(url, | 225 browser_->OpenURL(content::OpenURLParams(url, |
| 226 content::Referrer(), | 226 content::Referrer(), |
| 227 disposition, | 227 disposition, |
| 228 transition, | 228 transition, |
| 229 false)); | 229 false)); |
| 230 } | 230 } |
| 231 | 231 |
| 232 void BrowserInstantController::SetMarginSize(int start, int end) { | 232 void BrowserInstantController::SetStartMarginAndWidth(int margin, int width) { |
| 233 instant_.SetMarginSize(start, end); | 233 instant_.SetStartMarginAndWidth(margin, width); |
| 234 } | 234 } |
| 235 | 235 |
| 236 void BrowserInstantController::ResetInstant() { | 236 void BrowserInstantController::ResetInstant() { |
| 237 bool instant_enabled = IsInstantEnabled(profile()); | 237 bool instant_enabled = IsInstantEnabled(profile()); |
| 238 bool use_local_preview_only = profile()->IsOffTheRecord() || | 238 bool use_local_preview_only = profile()->IsOffTheRecord() || |
| 239 (!instant_enabled && | 239 (!instant_enabled && |
| 240 !profile()->GetPrefs()->GetBoolean(prefs::kSearchSuggestEnabled)); | 240 !profile()->GetPrefs()->GetBoolean(prefs::kSearchSuggestEnabled)); |
| 241 instant_.SetInstantEnabled(instant_enabled, use_local_preview_only); | 241 instant_.SetInstantEnabled(instant_enabled, use_local_preview_only); |
| 242 } | 242 } |
| 243 | 243 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 initialized_theme_info_ = true; | 341 initialized_theme_info_ = true; |
| 342 } | 342 } |
| 343 | 343 |
| 344 DCHECK(initialized_theme_info_); | 344 DCHECK(initialized_theme_info_); |
| 345 | 345 |
| 346 if (browser_->search_model()->mode().is_ntp()) | 346 if (browser_->search_model()->mode().is_ntp()) |
| 347 instant_.ThemeChanged(theme_info_); | 347 instant_.ThemeChanged(theme_info_); |
| 348 } | 348 } |
| 349 | 349 |
| 350 } // namespace chrome | 350 } // namespace chrome |
| OLD | NEW |