| 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 void BrowserInstantController::OpenURLInCurrentTab( | 221 void BrowserInstantController::OpenURLInCurrentTab( |
| 222 const GURL& url, | 222 const GURL& url, |
| 223 content::PageTransition transition) { | 223 content::PageTransition transition) { |
| 224 browser_->OpenURL(content::OpenURLParams(url, | 224 browser_->OpenURL(content::OpenURLParams(url, |
| 225 content::Referrer(), | 225 content::Referrer(), |
| 226 CURRENT_TAB, | 226 CURRENT_TAB, |
| 227 transition, | 227 transition, |
| 228 false)); | 228 false)); |
| 229 } | 229 } |
| 230 | 230 |
| 231 void BrowserInstantController::SetMarginSize(int start, int end) { | 231 void BrowserInstantController::SetStartMarginAndWidth(int margin, int width) { |
| 232 instant_.SetMarginSize(start, end); | 232 instant_.SetStartMarginAndWidth(margin, width); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void BrowserInstantController::ResetInstant() { | 235 void BrowserInstantController::ResetInstant() { |
| 236 bool instant_enabled = IsInstantEnabled(profile()); | 236 bool instant_enabled = IsInstantEnabled(profile()); |
| 237 bool use_local_preview_only = profile()->IsOffTheRecord() || | 237 bool use_local_preview_only = profile()->IsOffTheRecord() || |
| 238 (!instant_enabled && | 238 (!instant_enabled && |
| 239 !profile()->GetPrefs()->GetBoolean(prefs::kSearchSuggestEnabled)); | 239 !profile()->GetPrefs()->GetBoolean(prefs::kSearchSuggestEnabled)); |
| 240 instant_.SetInstantEnabled(instant_enabled, use_local_preview_only); | 240 instant_.SetInstantEnabled(instant_enabled, use_local_preview_only); |
| 241 } | 241 } |
| 242 | 242 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 initialized_theme_info_ = true; | 340 initialized_theme_info_ = true; |
| 341 } | 341 } |
| 342 | 342 |
| 343 DCHECK(initialized_theme_info_); | 343 DCHECK(initialized_theme_info_); |
| 344 | 344 |
| 345 if (browser_->search_model()->mode().is_ntp()) | 345 if (browser_->search_model()->mode().is_ntp()) |
| 346 instant_.ThemeChanged(theme_info_); | 346 instant_.ThemeChanged(theme_info_); |
| 347 } | 347 } |
| 348 | 348 |
| 349 } // namespace chrome | 349 } // namespace chrome |
| OLD | NEW |