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 28 matching lines...) Expand all Loading... |
39 } | 39 } |
40 | 40 |
41 void InstantTab::SetDisplayInstantResults(bool display_instant_results) { | 41 void InstantTab::SetDisplayInstantResults(bool display_instant_results) { |
42 client_.SetDisplayInstantResults(display_instant_results); | 42 client_.SetDisplayInstantResults(display_instant_results); |
43 } | 43 } |
44 | 44 |
45 void InstantTab::UpOrDownKeyPressed(int count) { | 45 void InstantTab::UpOrDownKeyPressed(int count) { |
46 client_.UpOrDownKeyPressed(count); | 46 client_.UpOrDownKeyPressed(count); |
47 } | 47 } |
48 | 48 |
| 49 void InstantTab::SetMarginSize(int start, int end) { |
| 50 client_.SetMarginSize(start, end); |
| 51 } |
| 52 |
49 void InstantTab::SetSuggestions( | 53 void InstantTab::SetSuggestions( |
50 const std::vector<InstantSuggestion>& suggestions) { | 54 const std::vector<InstantSuggestion>& suggestions) { |
51 InstantSupportDetermined(true); | 55 InstantSupportDetermined(true); |
52 controller_->SetSuggestions(contents_, suggestions); | 56 controller_->SetSuggestions(contents_, suggestions); |
53 } | 57 } |
54 | 58 |
55 void InstantTab::InstantSupportDetermined(bool supports_instant) { | 59 void InstantTab::InstantSupportDetermined(bool supports_instant) { |
56 // If we had already determined that the page supports Instant, nothing to do. | 60 // If we had already determined that the page supports Instant, nothing to do. |
57 if (supports_instant_) | 61 if (supports_instant_) |
58 return; | 62 return; |
(...skipping 21 matching lines...) Expand all Loading... |
80 // We don't honor this call from committed tabs. | 84 // We don't honor this call from committed tabs. |
81 } | 85 } |
82 | 86 |
83 void InstantTab::RenderViewGone() { | 87 void InstantTab::RenderViewGone() { |
84 // For a commit page, a crash should not be handled differently. | 88 // For a commit page, a crash should not be handled differently. |
85 } | 89 } |
86 | 90 |
87 void InstantTab::AboutToNavigateMainFrame(const GURL& url) { | 91 void InstantTab::AboutToNavigateMainFrame(const GURL& url) { |
88 // The client is a committed tab, navigations will happen as expected. | 92 // The client is a committed tab, navigations will happen as expected. |
89 } | 93 } |
OLD | NEW |