| 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/instant/instant_controller.h" | 8 #include "chrome/browser/instant/instant_controller.h" |
| 9 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 9 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
| 10 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" | 10 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 } | 217 } |
| 218 | 218 |
| 219 void InstantLoader::Submit(const string16& text) { | 219 void InstantLoader::Submit(const string16& text) { |
| 220 client_.Submit(text); | 220 client_.Submit(text); |
| 221 } | 221 } |
| 222 | 222 |
| 223 void InstantLoader::Cancel(const string16& text) { | 223 void InstantLoader::Cancel(const string16& text) { |
| 224 client_.Cancel(text); | 224 client_.Cancel(text); |
| 225 } | 225 } |
| 226 | 226 |
| 227 void InstantLoader::SetOmniboxBounds(const gfx::Rect& bounds) { | 227 void InstantLoader::SetPopupBounds(const gfx::Rect& bounds) { |
| 228 client_.SetOmniboxBounds(bounds); | 228 client_.SetPopupBounds(bounds); |
| 229 } |
| 230 |
| 231 void InstantLoader::SetMarginSize(int start, int end) { |
| 232 client_.SetMarginSize(start, end); |
| 229 } | 233 } |
| 230 | 234 |
| 231 void InstantLoader::SendAutocompleteResults( | 235 void InstantLoader::SendAutocompleteResults( |
| 232 const std::vector<InstantAutocompleteResult>& results) { | 236 const std::vector<InstantAutocompleteResult>& results) { |
| 233 client_.SendAutocompleteResults(results); | 237 client_.SendAutocompleteResults(results); |
| 234 } | 238 } |
| 235 | 239 |
| 236 void InstantLoader::UpOrDownKeyPressed(int count) { | 240 void InstantLoader::UpOrDownKeyPressed(int count) { |
| 237 client_.UpOrDownKeyPressed(count); | 241 client_.UpOrDownKeyPressed(count); |
| 238 } | 242 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 content::WebContents* new_contents) { | 375 content::WebContents* new_contents) { |
| 372 DCHECK_EQ(old_contents, contents()); | 376 DCHECK_EQ(old_contents, contents()); |
| 373 CleanupPreviewContents(); | 377 CleanupPreviewContents(); |
| 374 // We release here without deleting so that the caller still has the | 378 // We release here without deleting so that the caller still has the |
| 375 // responsibility for deleting the WebContents. | 379 // responsibility for deleting the WebContents. |
| 376 ignore_result(contents_.release()); | 380 ignore_result(contents_.release()); |
| 377 contents_.reset(new_contents); | 381 contents_.reset(new_contents); |
| 378 SetupPreviewContents(); | 382 SetupPreviewContents(); |
| 379 controller_->SwappedWebContents(); | 383 controller_->SwappedWebContents(); |
| 380 } | 384 } |
| OLD | NEW |