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

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

Issue 10915217: Hook up SetInstantPreviewHeight for ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More comments. Created 8 years, 3 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/browser_shutdown.h" 7 #include "chrome/browser/browser_shutdown.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/instant/instant_controller.h" 9 #include "chrome/browser/instant/instant_controller.h"
10 #include "chrome/browser/instant/instant_unload_handler.h" 10 #include "chrome/browser/instant/instant_unload_handler.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 gfx::Rect BrowserInstantController::GetInstantBounds() { 135 gfx::Rect BrowserInstantController::GetInstantBounds() {
136 return browser_->window()->GetInstantBounds(); 136 return browser_->window()->GetInstantBounds();
137 } 137 }
138 138
139 void BrowserInstantController::InstantPreviewFocused() { 139 void BrowserInstantController::InstantPreviewFocused() {
140 // NOTE: This is only invoked on aura. 140 // NOTE: This is only invoked on aura.
141 browser_->window()->WebContentsFocused( 141 browser_->window()->WebContentsFocused(
142 instant_->GetPreviewContents()->web_contents()); 142 instant_->GetPreviewContents()->web_contents());
143 } 143 }
144 144
145 void BrowserInstantController::SetInstantPreviewHeight(int height,
146 InstantSizeUnits units) {
147 browser_->window()->SetInstantPreviewHeight(height, units);
148 }
149
145 TabContents* BrowserInstantController::GetActiveTabContents() const { 150 TabContents* BrowserInstantController::GetActiveTabContents() const {
146 return chrome::GetActiveTabContents(browser_); 151 return chrome::GetActiveTabContents(browser_);
147 } 152 }
148 153
149 //////////////////////////////////////////////////////////////////////////////// 154 ////////////////////////////////////////////////////////////////////////////////
150 // BrowserInstantController, content::NotificationObserver implementation: 155 // BrowserInstantController, content::NotificationObserver implementation:
151 156
152 void BrowserInstantController::Observe( 157 void BrowserInstantController::Observe(
153 int type, 158 int type,
154 const content::NotificationSource& source, 159 const content::NotificationSource& source,
(...skipping 18 matching lines...) Expand all
173 void BrowserInstantController::ResetInstant() { 178 void BrowserInstantController::ResetInstant() {
174 instant_.reset( 179 instant_.reset(
175 !browser_shutdown::ShuttingDownWithoutClosingBrowsers() && 180 !browser_shutdown::ShuttingDownWithoutClosingBrowsers() &&
176 browser_->is_type_tabbed() ? 181 browser_->is_type_tabbed() ?
177 InstantController::CreateInstant(browser_->profile(), this) : NULL); 182 InstantController::CreateInstant(browser_->profile(), this) : NULL);
178 instant_unload_handler_.reset(instant() ? 183 instant_unload_handler_.reset(instant() ?
179 new InstantUnloadHandler(browser_) : NULL); 184 new InstantUnloadHandler(browser_) : NULL);
180 } 185 }
181 186
182 } // namespace chrome 187 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698