| 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/instant/instant_loader.h" | 5 #include "chrome/browser/instant/instant_loader.h" |
| 6 | 6 |
| 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" | 8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" |
| 9 #include "chrome/browser/favicon/favicon_tab_helper.h" | 9 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 10 #include "chrome/browser/history/history_tab_helper.h" | 10 #include "chrome/browser/history/history_tab_helper.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 254 |
| 255 void InstantLoader::SendAutocompleteResults( | 255 void InstantLoader::SendAutocompleteResults( |
| 256 const std::vector<InstantAutocompleteResult>& results) { | 256 const std::vector<InstantAutocompleteResult>& results) { |
| 257 client_.SendAutocompleteResults(results); | 257 client_.SendAutocompleteResults(results); |
| 258 } | 258 } |
| 259 | 259 |
| 260 void InstantLoader::UpOrDownKeyPressed(int count) { | 260 void InstantLoader::UpOrDownKeyPressed(int count) { |
| 261 client_.UpOrDownKeyPressed(count); | 261 client_.UpOrDownKeyPressed(count); |
| 262 } | 262 } |
| 263 | 263 |
| 264 void InstantLoader::EscKeyPressed() { |
| 265 client_.EscKeyPressed(); |
| 266 } |
| 267 |
| 264 void InstantLoader::SearchModeChanged(const chrome::search::Mode& mode) { | 268 void InstantLoader::SearchModeChanged(const chrome::search::Mode& mode) { |
| 265 client_.SearchModeChanged(mode); | 269 client_.SearchModeChanged(mode); |
| 266 } | 270 } |
| 267 | 271 |
| 268 void InstantLoader::SendThemeBackgroundInfo( | 272 void InstantLoader::SendThemeBackgroundInfo( |
| 269 const ThemeBackgroundInfo& theme_info) { | 273 const ThemeBackgroundInfo& theme_info) { |
| 270 client_.SendThemeBackgroundInfo(theme_info); | 274 client_.SendThemeBackgroundInfo(theme_info); |
| 271 } | 275 } |
| 272 | 276 |
| 273 void InstantLoader::SendThemeAreaHeight(int height) { | 277 void InstantLoader::SendThemeAreaHeight(int height) { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 content::WebContents* new_contents) { | 423 content::WebContents* new_contents) { |
| 420 DCHECK_EQ(old_contents, contents()); | 424 DCHECK_EQ(old_contents, contents()); |
| 421 CleanupPreviewContents(); | 425 CleanupPreviewContents(); |
| 422 // We release here without deleting so that the caller still has the | 426 // We release here without deleting so that the caller still has the |
| 423 // responsibility for deleting the WebContents. | 427 // responsibility for deleting the WebContents. |
| 424 ignore_result(contents_.release()); | 428 ignore_result(contents_.release()); |
| 425 contents_.reset(new_contents); | 429 contents_.reset(new_contents); |
| 426 SetupPreviewContents(); | 430 SetupPreviewContents(); |
| 427 controller_->SwappedWebContents(); | 431 controller_->SwappedWebContents(); |
| 428 } | 432 } |
| OLD | NEW |