OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_page.h" | 5 #include "chrome/browser/instant/instant_page.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/common/render_messages.h" | 8 #include "chrome/common/render_messages.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 void InstantPage::SendAutocompleteResults( | 62 void InstantPage::SendAutocompleteResults( |
63 const std::vector<InstantAutocompleteResult>& results) { | 63 const std::vector<InstantAutocompleteResult>& results) { |
64 Send(new ChromeViewMsg_SearchBoxAutocompleteResults(routing_id(), results)); | 64 Send(new ChromeViewMsg_SearchBoxAutocompleteResults(routing_id(), results)); |
65 } | 65 } |
66 | 66 |
67 void InstantPage::UpOrDownKeyPressed(int count) { | 67 void InstantPage::UpOrDownKeyPressed(int count) { |
68 Send(new ChromeViewMsg_SearchBoxUpOrDownKeyPressed(routing_id(), count)); | 68 Send(new ChromeViewMsg_SearchBoxUpOrDownKeyPressed(routing_id(), count)); |
69 } | 69 } |
70 | 70 |
| 71 void InstantPage::CancelSelection(const string16& user_text) { |
| 72 Send(new ChromeViewMsg_SearchBoxCancelSelection(routing_id(), user_text)); |
| 73 } |
| 74 |
71 void InstantPage::SendThemeBackgroundInfo( | 75 void InstantPage::SendThemeBackgroundInfo( |
72 const ThemeBackgroundInfo& theme_info) { | 76 const ThemeBackgroundInfo& theme_info) { |
73 Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info)); | 77 Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info)); |
74 } | 78 } |
75 | 79 |
76 void InstantPage::SendThemeAreaHeight(int height) { | 80 void InstantPage::SendThemeAreaHeight(int height) { |
77 Send(new ChromeViewMsg_SearchBoxThemeAreaHeightChanged(routing_id(), height)); | 81 Send(new ChromeViewMsg_SearchBoxThemeAreaHeightChanged(routing_id(), height)); |
78 } | 82 } |
79 | 83 |
80 void InstantPage::SetDisplayInstantResults(bool display_instant_results) { | 84 void InstantPage::SetDisplayInstantResults(bool display_instant_results) { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 234 |
231 void InstantPage::OnSearchBoxNavigate(int page_id, | 235 void InstantPage::OnSearchBoxNavigate(int page_id, |
232 const GURL& url, | 236 const GURL& url, |
233 content::PageTransition transition) { | 237 content::PageTransition transition) { |
234 if (contents()->IsActiveEntry(page_id)) { | 238 if (contents()->IsActiveEntry(page_id)) { |
235 OnInstantSupportDetermined(page_id, true); | 239 OnInstantSupportDetermined(page_id, true); |
236 if (ShouldProcessNavigateToURL()) | 240 if (ShouldProcessNavigateToURL()) |
237 delegate_->NavigateToURL(contents(), url, transition); | 241 delegate_->NavigateToURL(contents(), url, transition); |
238 } | 242 } |
239 } | 243 } |
OLD | NEW |