| 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 "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/themes/theme_service.h" | 10 #include "chrome/browser/themes/theme_service.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 void BrowserInstantController::OpenURLInCurrentTab( | 185 void BrowserInstantController::OpenURLInCurrentTab( |
| 186 const GURL& url, | 186 const GURL& url, |
| 187 content::PageTransition transition) { | 187 content::PageTransition transition) { |
| 188 browser_->OpenURL(content::OpenURLParams(url, | 188 browser_->OpenURL(content::OpenURLParams(url, |
| 189 content::Referrer(), | 189 content::Referrer(), |
| 190 CURRENT_TAB, | 190 CURRENT_TAB, |
| 191 transition, | 191 transition, |
| 192 false)); | 192 false)); |
| 193 } | 193 } |
| 194 | 194 |
| 195 void BrowserInstantController::SetMarginSize(int start, int end) { | 195 void BrowserInstantController::SetStartMarginAndWidth(int margin, int width) { |
| 196 instant_.SetMarginSize(start, end); | 196 instant_.SetStartMarginAndWidth(margin, width); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void BrowserInstantController::ResetInstant() { | 199 void BrowserInstantController::ResetInstant() { |
| 200 instant_.SetInstantEnabled(IsInstantEnabled(browser_->profile())); | 200 instant_.SetInstantEnabled(IsInstantEnabled(browser_->profile())); |
| 201 } | 201 } |
| 202 | 202 |
| 203 //////////////////////////////////////////////////////////////////////////////// | 203 //////////////////////////////////////////////////////////////////////////////// |
| 204 // BrowserInstantController, search::SearchModelObserver implementation: | 204 // BrowserInstantController, search::SearchModelObserver implementation: |
| 205 | 205 |
| 206 void BrowserInstantController::ModeChanged(const search::Mode& old_mode, | 206 void BrowserInstantController::ModeChanged(const search::Mode& old_mode, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 // part of the image overlay should draw, 'cos the origin is top-left. | 313 // part of the image overlay should draw, 'cos the origin is top-left. |
| 314 if (!browser_->search_model()->mode().is_ntp() || | 314 if (!browser_->search_model()->mode().is_ntp() || |
| 315 theme_info_.theme_id.empty() || | 315 theme_info_.theme_id.empty() || |
| 316 theme_info_.image_vertical_alignment == THEME_BKGRND_IMAGE_ALIGN_TOP) { | 316 theme_info_.image_vertical_alignment == THEME_BKGRND_IMAGE_ALIGN_TOP) { |
| 317 return; | 317 return; |
| 318 } | 318 } |
| 319 instant_.ThemeAreaHeightChanged(theme_area_height_); | 319 instant_.ThemeAreaHeightChanged(theme_area_height_); |
| 320 } | 320 } |
| 321 | 321 |
| 322 } // namespace chrome | 322 } // namespace chrome |
| OLD | NEW |