| 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/extensions/extension_web_ui.h" | 9 #include "chrome/browser/extensions/extension_web_ui.h" |
| 10 #include "chrome/browser/prefs/pref_registry_syncable.h" | 10 #include "chrome/browser/prefs/pref_registry_syncable.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 const GURL& url, | 241 const GURL& url, |
| 242 content::PageTransition transition, | 242 content::PageTransition transition, |
| 243 WindowOpenDisposition disposition) { | 243 WindowOpenDisposition disposition) { |
| 244 browser_->OpenURL(content::OpenURLParams(url, | 244 browser_->OpenURL(content::OpenURLParams(url, |
| 245 content::Referrer(), | 245 content::Referrer(), |
| 246 disposition, | 246 disposition, |
| 247 transition, | 247 transition, |
| 248 false)); | 248 false)); |
| 249 } | 249 } |
| 250 | 250 |
| 251 void BrowserInstantController::SetMarginSize(int start, int end) { | 251 void BrowserInstantController::SetOmniboxBounds(const gfx::Rect& bounds) { |
| 252 instant_.SetMarginSize(start, end); | 252 instant_.SetOmniboxBounds(bounds); |
| 253 } | 253 } |
| 254 | 254 |
| 255 void BrowserInstantController::ResetInstant() { | 255 void BrowserInstantController::ResetInstant() { |
| 256 bool instant_enabled = IsInstantEnabled(profile()); | 256 bool instant_enabled = IsInstantEnabled(profile()); |
| 257 bool use_local_preview_only = profile()->IsOffTheRecord() || | 257 bool use_local_preview_only = profile()->IsOffTheRecord() || |
| 258 (!instant_enabled && | 258 (!instant_enabled && |
| 259 !profile()->GetPrefs()->GetBoolean(prefs::kSearchSuggestEnabled)); | 259 !profile()->GetPrefs()->GetBoolean(prefs::kSearchSuggestEnabled)); |
| 260 instant_.SetInstantEnabled(instant_enabled, use_local_preview_only); | 260 instant_.SetInstantEnabled(instant_enabled, use_local_preview_only); |
| 261 } | 261 } |
| 262 | 262 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 initialized_theme_info_ = true; | 360 initialized_theme_info_ = true; |
| 361 } | 361 } |
| 362 | 362 |
| 363 DCHECK(initialized_theme_info_); | 363 DCHECK(initialized_theme_info_); |
| 364 | 364 |
| 365 if (browser_->search_model()->mode().is_ntp()) | 365 if (browser_->search_model()->mode().is_ntp()) |
| 366 instant_.ThemeChanged(theme_info_); | 366 instant_.ThemeChanged(theme_info_); |
| 367 } | 367 } |
| 368 | 368 |
| 369 } // namespace chrome | 369 } // namespace chrome |
| OLD | NEW |