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::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::KeyCaptureChanged(bool is_key_capture_enabled) { |
| 46 client_.KeyCaptureChanged(is_key_capture_enabled); |
| 47 } |
| 48 |
45 void InstantTab::UpOrDownKeyPressed(int count) { | 49 void InstantTab::UpOrDownKeyPressed(int count) { |
46 client_.UpOrDownKeyPressed(count); | 50 client_.UpOrDownKeyPressed(count); |
47 } | 51 } |
48 | 52 |
49 void InstantTab::SetMarginSize(int start, int end) { | 53 void InstantTab::SetMarginSize(int start, int end) { |
50 client_.SetMarginSize(start, end); | 54 client_.SetMarginSize(start, end); |
51 } | 55 } |
52 | 56 |
53 void InstantTab::SetSuggestions( | 57 void InstantTab::SetSuggestions( |
54 const std::vector<InstantSuggestion>& suggestions) { | 58 const std::vector<InstantSuggestion>& suggestions) { |
(...skipping 15 matching lines...) Expand all Loading... |
70 controller_->InstantSupportDetermined(contents_, supports_instant); | 74 controller_->InstantSupportDetermined(contents_, supports_instant); |
71 } | 75 } |
72 | 76 |
73 void InstantTab::ShowInstantPreview(InstantShownReason /* reason */, | 77 void InstantTab::ShowInstantPreview(InstantShownReason /* reason */, |
74 int /* height */, | 78 int /* height */, |
75 InstantSizeUnits /* units */) { | 79 InstantSizeUnits /* units */) { |
76 // The page is a committed tab (i.e., always showing), so nothing to do. | 80 // The page is a committed tab (i.e., always showing), so nothing to do. |
77 } | 81 } |
78 | 82 |
79 void InstantTab::StartCapturingKeyStrokes() { | 83 void InstantTab::StartCapturingKeyStrokes() { |
80 // We don't honor this call from committed tabs. | 84 controller_->StartCapturingKeyStrokes(contents()); |
81 } | 85 } |
82 | 86 |
83 void InstantTab::StopCapturingKeyStrokes() { | 87 void InstantTab::StopCapturingKeyStrokes() { |
84 // We don't honor this call from committed tabs. | 88 controller_->StopCapturingKeyStrokes(contents()); |
85 } | 89 } |
86 | 90 |
87 void InstantTab::RenderViewGone() { | 91 void InstantTab::RenderViewGone() { |
88 // For a commit page, a crash should not be handled differently. | 92 // For a commit page, a crash should not be handled differently. |
89 } | 93 } |
90 | 94 |
91 void InstantTab::AboutToNavigateMainFrame(const GURL& url) { | 95 void InstantTab::AboutToNavigateMainFrame(const GURL& url) { |
92 // The client is a committed tab, navigations will happen as expected. | 96 // The client is a committed tab, navigations will happen as expected. |
93 } | 97 } |
94 | 98 |
95 void InstantTab::NavigateToURL(const GURL& url, | 99 void InstantTab::NavigateToURL(const GURL& url, |
96 content::PageTransition transition) { | 100 content::PageTransition transition) { |
97 controller_->NavigateToURL(url, transition); | 101 controller_->NavigateToURL(url, transition); |
98 } | 102 } |
OLD | NEW |