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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 content::WebContents* new_contents) { | 364 content::WebContents* new_contents) { |
361 DCHECK_EQ(old_contents, contents()); | 365 DCHECK_EQ(old_contents, contents()); |
362 CleanupPreviewContents(); | 366 CleanupPreviewContents(); |
363 // We release here without deleting so that the caller still has the | 367 // We release here without deleting so that the caller still has the |
364 // responsibility for deleting the WebContents. | 368 // responsibility for deleting the WebContents. |
365 ignore_result(contents_.release()); | 369 ignore_result(contents_.release()); |
366 contents_.reset(new_contents); | 370 contents_.reset(new_contents); |
367 SetupPreviewContents(); | 371 SetupPreviewContents(); |
368 controller_->SwappedWebContents(); | 372 controller_->SwappedWebContents(); |
369 } | 373 } |
OLD | NEW |