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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 237 } |
238 | 238 |
239 void InstantLoader::Submit(const string16& text) { | 239 void InstantLoader::Submit(const string16& text) { |
240 client_.Submit(text); | 240 client_.Submit(text); |
241 } | 241 } |
242 | 242 |
243 void InstantLoader::Cancel(const string16& text) { | 243 void InstantLoader::Cancel(const string16& text) { |
244 client_.Cancel(text); | 244 client_.Cancel(text); |
245 } | 245 } |
246 | 246 |
247 void InstantLoader::SetOmniboxBounds(const gfx::Rect& bounds) { | 247 void InstantLoader::SetPopupBounds(const gfx::Rect& bounds) { |
248 client_.SetOmniboxBounds(bounds); | 248 client_.SetPopupBounds(bounds); |
| 249 } |
| 250 |
| 251 void InstantLoader::SetMarginSize(int start, int end) { |
| 252 client_.SetMarginSize(start, end); |
249 } | 253 } |
250 | 254 |
251 void InstantLoader::SendAutocompleteResults( | 255 void InstantLoader::SendAutocompleteResults( |
252 const std::vector<InstantAutocompleteResult>& results) { | 256 const std::vector<InstantAutocompleteResult>& results) { |
253 client_.SendAutocompleteResults(results); | 257 client_.SendAutocompleteResults(results); |
254 } | 258 } |
255 | 259 |
256 void InstantLoader::UpOrDownKeyPressed(int count) { | 260 void InstantLoader::UpOrDownKeyPressed(int count) { |
257 client_.UpOrDownKeyPressed(count); | 261 client_.UpOrDownKeyPressed(count); |
258 } | 262 } |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 content::WebContents* new_contents) { | 417 content::WebContents* new_contents) { |
414 DCHECK_EQ(old_contents, contents()); | 418 DCHECK_EQ(old_contents, contents()); |
415 CleanupPreviewContents(); | 419 CleanupPreviewContents(); |
416 // We release here without deleting so that the caller still has the | 420 // We release here without deleting so that the caller still has the |
417 // responsibility for deleting the WebContents. | 421 // responsibility for deleting the WebContents. |
418 ignore_result(contents_.release()); | 422 ignore_result(contents_.release()); |
419 contents_.reset(new_contents); | 423 contents_.reset(new_contents); |
420 SetupPreviewContents(); | 424 SetupPreviewContents(); |
421 controller_->SwappedWebContents(); | 425 controller_->SwappedWebContents(); |
422 } | 426 } |
OLD | NEW |