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

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

Issue 11555033: Adding local html page used in Instant Extended mode when instant is disabled or unavailable. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressing estade's comments.wq 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
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 22 matching lines...) Expand all
33 } 33 }
34 34
35 namespace chrome { 35 namespace chrome {
36 36
37 //////////////////////////////////////////////////////////////////////////////// 37 ////////////////////////////////////////////////////////////////////////////////
38 // BrowserInstantController, public: 38 // BrowserInstantController, public:
39 39
40 BrowserInstantController::BrowserInstantController(Browser* browser) 40 BrowserInstantController::BrowserInstantController(Browser* browser)
41 : browser_(browser), 41 : browser_(browser),
42 instant_(ALLOW_THIS_IN_INITIALIZER_LIST(this), 42 instant_(ALLOW_THIS_IN_INITIALIZER_LIST(this),
43 chrome::search::IsInstantExtendedAPIEnabled(browser->profile())), 43 chrome::search::IsInstantExtendedAPIEnabled(browser->profile()),
44 browser->profile()->IsOffTheRecord()),
44 instant_unload_handler_(browser), 45 instant_unload_handler_(browser),
45 initialized_theme_info_(false), 46 initialized_theme_info_(false),
46 theme_area_height_(0) { 47 theme_area_height_(0) {
47 profile_pref_registrar_.Init(browser_->profile()->GetPrefs()); 48 profile_pref_registrar_.Init(browser_->profile()->GetPrefs());
48 profile_pref_registrar_.Add( 49 profile_pref_registrar_.Add(
49 GetInstantPrefName(browser_->profile()), 50 GetInstantPrefName(browser_->profile()),
50 base::Bind(&BrowserInstantController::ResetInstant, 51 base::Bind(&BrowserInstantController::ResetInstant,
51 base::Unretained(this))); 52 base::Unretained(this)));
52 ResetInstant(); 53 ResetInstant();
53 browser_->search_model()->AddObserver(this); 54 browser_->search_model()->AddObserver(this);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // part of the image overlay should draw, 'cos the origin is top-left. 289 // part of the image overlay should draw, 'cos the origin is top-left.
289 if (!browser_->search_model()->mode().is_ntp() || 290 if (!browser_->search_model()->mode().is_ntp() ||
290 theme_info_.theme_id.empty() || 291 theme_info_.theme_id.empty() ||
291 theme_info_.image_vertical_alignment == THEME_BKGRND_IMAGE_ALIGN_TOP) { 292 theme_info_.image_vertical_alignment == THEME_BKGRND_IMAGE_ALIGN_TOP) {
292 return; 293 return;
293 } 294 }
294 instant_.ThemeAreaHeightChanged(theme_area_height_); 295 instant_.ThemeAreaHeightChanged(theme_area_height_);
295 } 296 }
296 297
297 } // namespace chrome 298 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698