| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 void BrowserInstantController::UpdateThemeInfo(bool parse_theme_info) { | 212 void BrowserInstantController::UpdateThemeInfo(bool parse_theme_info) { |
| 213 // Update theme background info. | 213 // Update theme background info. |
| 214 // Initialize or re-parse |theme_info| if necessary. | 214 // Initialize or re-parse |theme_info| if necessary. |
| 215 if (!initialized_theme_info_ || parse_theme_info) | 215 if (!initialized_theme_info_ || parse_theme_info) |
| 216 OnThemeChanged(ThemeServiceFactory::GetForProfile(profile())); | 216 OnThemeChanged(ThemeServiceFactory::GetForProfile(profile())); |
| 217 else | 217 else |
| 218 OnThemeChanged(NULL); | 218 OnThemeChanged(NULL); |
| 219 } | 219 } |
| 220 | 220 |
| 221 void BrowserInstantController::OpenURLInCurrentTab( | 221 void BrowserInstantController::OpenURL( |
| 222 const GURL& url, | 222 const GURL& url, |
| 223 content::PageTransition transition) { | 223 content::PageTransition transition, |
| 224 WindowOpenDisposition disposition) { |
| 224 browser_->OpenURL(content::OpenURLParams(url, | 225 browser_->OpenURL(content::OpenURLParams(url, |
| 225 content::Referrer(), | 226 content::Referrer(), |
| 226 CURRENT_TAB, | 227 disposition, |
| 227 transition, | 228 transition, |
| 228 false)); | 229 false)); |
| 229 } | 230 } |
| 230 | 231 |
| 231 void BrowserInstantController::SetMarginSize(int start, int end) { | 232 void BrowserInstantController::SetMarginSize(int start, int end) { |
| 232 instant_.SetMarginSize(start, end); | 233 instant_.SetMarginSize(start, end); |
| 233 } | 234 } |
| 234 | 235 |
| 235 void BrowserInstantController::ResetInstant() { | 236 void BrowserInstantController::ResetInstant() { |
| 236 bool instant_enabled = IsInstantEnabled(profile()); | 237 bool instant_enabled = IsInstantEnabled(profile()); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 initialized_theme_info_ = true; | 341 initialized_theme_info_ = true; |
| 341 } | 342 } |
| 342 | 343 |
| 343 DCHECK(initialized_theme_info_); | 344 DCHECK(initialized_theme_info_); |
| 344 | 345 |
| 345 if (browser_->search_model()->mode().is_ntp()) | 346 if (browser_->search_model()->mode().is_ntp()) |
| 346 instant_.ThemeChanged(theme_info_); | 347 instant_.ThemeChanged(theme_info_); |
| 347 } | 348 } |
| 348 | 349 |
| 349 } // namespace chrome | 350 } // namespace chrome |
| OLD | NEW |