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

Unified Diff: chrome/browser/ui/browser_instant_controller.cc

Issue 18223002: InstantExtended: Remove overlay control code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Call renamed method. Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/browser/ui/cocoa/browser_window_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_instant_controller.cc
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc
index aa8b59df03acfe3f838ed623b3d2d6d4b2127747..6203f514206cc8bde337aed588db7a3c8e45a6f2 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -37,8 +37,7 @@ using content::UserMetricsAction;
BrowserInstantController::BrowserInstantController(Browser* browser)
: browser_(browser),
- instant_(this,
- chrome::IsInstantExtendedAPIEnabled()),
+ instant_(this, chrome::IsInstantExtendedAPIEnabled()),
instant_unload_handler_(browser) {
// TODO(sreeram): Perhaps this can be removed, if field trial info is
@@ -146,29 +145,6 @@ Profile* BrowserInstantController::profile() const {
return browser_->profile();
}
-void BrowserInstantController::CommitInstant(
- scoped_ptr<content::WebContents> overlay,
- bool in_new_tab) {
- const extensions::Extension* extension =
- profile()->GetExtensionService()->GetInstalledApp(overlay->GetURL());
- if (extension) {
- AppLauncherHandler::RecordAppLaunchType(
- extension_misc::APP_LAUNCH_OMNIBOX_INSTANT,
- extension->GetType());
- }
- if (in_new_tab) {
- // TabStripModel takes ownership of |overlay|.
- browser_->tab_strip_model()->AddWebContents(overlay.release(), -1,
- instant_.last_transition_type(), TabStripModel::ADD_ACTIVE);
- } else {
- content::WebContents* contents = overlay.get();
- ReplaceWebContentsAt(
- browser_->tab_strip_model()->active_index(),
- overlay.Pass());
- browser_->window()->GetLocationBar()->SaveStateToContents(contents);
- }
-}
-
void BrowserInstantController::ReplaceWebContentsAt(
int index,
scoped_ptr<content::WebContents> new_contents) {
@@ -179,20 +155,6 @@ void BrowserInstantController::ReplaceWebContentsAt(
index);
}
-void BrowserInstantController::SetInstantSuggestion(
- const InstantSuggestion& suggestion) {
- browser_->window()->GetLocationBar()->SetInstantSuggestion(suggestion);
-}
-
-gfx::Rect BrowserInstantController::GetInstantBounds() {
- return browser_->window()->GetInstantBounds();
-}
-
-void BrowserInstantController::InstantOverlayFocused() {
- // NOTE: This is only invoked on aura.
- browser_->window()->WebContentsFocused(instant_.GetOverlayContents());
-}
-
void BrowserInstantController::FocusOmnibox(bool caret_visibility) {
OmniboxView* omnibox_view = browser_->window()->GetLocationBar()->
GetLocationEntry();
@@ -244,9 +206,7 @@ void BrowserInstantController::ToggleVoiceSearch() {
}
void BrowserInstantController::ResetInstant(const std::string& pref_name) {
- bool instant_checkbox_checked = chrome::IsInstantCheckboxChecked(profile());
- bool use_local_overlay_only = !chrome::IsInstantCheckboxEnabled(profile());
- instant_.SetInstantEnabled(instant_checkbox_checked, use_local_overlay_only);
+ instant_.ReloadStaleNTP();
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/browser/ui/cocoa/browser_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698