Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: chrome/browser/ui/browser_instant_controller.cc

Issue 11466007: Add new IPC for searchbox to pipe SearchBox NavigateContentWindow calls to the browser. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove extra ; Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/common/instant_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void BrowserInstantController::UpdateThemeInfoForPreview() { 154 void BrowserInstantController::UpdateThemeInfoForPreview() {
155 // Update theme background info and theme area height. 155 // Update theme background info and theme area height.
156 // Initialize |theme_info| if necessary. 156 // Initialize |theme_info| if necessary.
157 // |OnThemeChanged| also updates theme area height if necessary. 157 // |OnThemeChanged| also updates theme area height if necessary.
158 if (!initialized_theme_info_) 158 if (!initialized_theme_info_)
159 OnThemeChanged(ThemeServiceFactory::GetForProfile(browser_->profile())); 159 OnThemeChanged(ThemeServiceFactory::GetForProfile(browser_->profile()));
160 else 160 else
161 OnThemeChanged(NULL); 161 OnThemeChanged(NULL);
162 } 162 }
163 163
164 void BrowserInstantController::OpenURLInCurrentTab(
165 const GURL& url,
166 content::PageTransition transition) {
167 browser_->OpenURL(content::OpenURLParams(url,
168 content::Referrer(),
169 CURRENT_TAB,
170 transition,
171 false));
172 }
173
164 void BrowserInstantController::ResetInstant() { 174 void BrowserInstantController::ResetInstant() {
165 instant_.SetInstantEnabled(IsInstantEnabled(browser_->profile())); 175 instant_.SetInstantEnabled(IsInstantEnabled(browser_->profile()));
166 } 176 }
167 177
168 //////////////////////////////////////////////////////////////////////////////// 178 ////////////////////////////////////////////////////////////////////////////////
169 // BrowserInstantController, search::SearchModelObserver implementation: 179 // BrowserInstantController, search::SearchModelObserver implementation:
170 180
171 void BrowserInstantController::ModeChanged(const search::Mode& old_mode, 181 void BrowserInstantController::ModeChanged(const search::Mode& old_mode,
172 const search::Mode& new_mode) { 182 const search::Mode& new_mode) {
173 // If mode is now |NTP|, send theme-related information to instant. 183 // If mode is now |NTP|, send theme-related information to instant.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // part of the image overlay should draw, 'cos the origin is top-left. 288 // part of the image overlay should draw, 'cos the origin is top-left.
279 if (!browser_->search_model()->mode().is_ntp() || 289 if (!browser_->search_model()->mode().is_ntp() ||
280 theme_info_.theme_id.empty() || 290 theme_info_.theme_id.empty() ||
281 theme_info_.image_vertical_alignment == THEME_BKGRND_IMAGE_ALIGN_TOP) { 291 theme_info_.image_vertical_alignment == THEME_BKGRND_IMAGE_ALIGN_TOP) {
282 return; 292 return;
283 } 293 }
284 instant_.ThemeAreaHeightChanged(theme_area_height_); 294 instant_.ThemeAreaHeightChanged(theme_area_height_);
285 } 295 }
286 296
287 } // namespace chrome 297 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/common/instant_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698