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_tab.h" | 5 #include "chrome/browser/instant/instant_tab.h" |
6 | 6 |
7 #include "chrome/browser/instant/instant_controller.h" | 7 #include "chrome/browser/instant/instant_controller.h" |
8 | 8 |
9 InstantTab::InstantTab(InstantController* controller, | 9 InstantTab::InstantTab(InstantController* controller, |
10 content::WebContents* contents) | 10 content::WebContents* contents) |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 void InstantTab::SendAutocompleteResults( | 36 void InstantTab::SendAutocompleteResults( |
37 const std::vector<InstantAutocompleteResult>& results) { | 37 const std::vector<InstantAutocompleteResult>& results) { |
38 client_.SendAutocompleteResults(results); | 38 client_.SendAutocompleteResults(results); |
39 } | 39 } |
40 | 40 |
41 void InstantTab::UpOrDownKeyPressed(int count) { | 41 void InstantTab::UpOrDownKeyPressed(int count) { |
42 client_.UpOrDownKeyPressed(count); | 42 client_.UpOrDownKeyPressed(count); |
43 } | 43 } |
44 | 44 |
| 45 void InstantTab::SetMarginSize(int start, int end) { |
| 46 client_.SetMarginSize(start, end); |
| 47 } |
| 48 |
45 void InstantTab::SetSuggestions( | 49 void InstantTab::SetSuggestions( |
46 const std::vector<InstantSuggestion>& suggestions) { | 50 const std::vector<InstantSuggestion>& suggestions) { |
47 InstantSupportDetermined(true); | 51 InstantSupportDetermined(true); |
48 controller_->SetSuggestions(contents_, suggestions); | 52 controller_->SetSuggestions(contents_, suggestions); |
49 } | 53 } |
50 | 54 |
51 void InstantTab::InstantSupportDetermined(bool supports_instant) { | 55 void InstantTab::InstantSupportDetermined(bool supports_instant) { |
52 // If we had already determined that the page supports Instant, nothing to do. | 56 // If we had already determined that the page supports Instant, nothing to do. |
53 if (supports_instant_) | 57 if (supports_instant_) |
54 return; | 58 return; |
(...skipping 13 matching lines...) Expand all Loading... |
68 // The page is a committed tab (i.e., always showing), so nothing to do. | 72 // The page is a committed tab (i.e., always showing), so nothing to do. |
69 } | 73 } |
70 | 74 |
71 void InstantTab::StartCapturingKeyStrokes() { | 75 void InstantTab::StartCapturingKeyStrokes() { |
72 // We don't honor this call from committed tabs. | 76 // We don't honor this call from committed tabs. |
73 } | 77 } |
74 | 78 |
75 void InstantTab::StopCapturingKeyStrokes() { | 79 void InstantTab::StopCapturingKeyStrokes() { |
76 // We don't honor this call from committed tabs. | 80 // We don't honor this call from committed tabs. |
77 } | 81 } |
OLD | NEW |