| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 void InstantPage::SendAutocompleteResults( | 57 void InstantPage::SendAutocompleteResults( |
| 58 const std::vector<InstantAutocompleteResult>& results) { | 58 const std::vector<InstantAutocompleteResult>& results) { |
| 59 Send(new ChromeViewMsg_SearchBoxAutocompleteResults(routing_id(), results)); | 59 Send(new ChromeViewMsg_SearchBoxAutocompleteResults(routing_id(), results)); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void InstantPage::UpOrDownKeyPressed(int count) { | 62 void InstantPage::UpOrDownKeyPressed(int count) { |
| 63 Send(new ChromeViewMsg_SearchBoxUpOrDownKeyPressed(routing_id(), count)); | 63 Send(new ChromeViewMsg_SearchBoxUpOrDownKeyPressed(routing_id(), count)); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void InstantPage::EscKeyPressed() { |
| 67 Send(new ChromeViewMsg_SearchBoxEscKeyPressed(routing_id())); |
| 68 } |
| 69 |
| 66 void InstantPage::SearchModeChanged(const chrome::search::Mode& mode) { | 70 void InstantPage::SearchModeChanged(const chrome::search::Mode& mode) { |
| 67 Send(new ChromeViewMsg_SearchBoxModeChanged(routing_id(), mode)); | 71 Send(new ChromeViewMsg_SearchBoxModeChanged(routing_id(), mode)); |
| 68 } | 72 } |
| 69 | 73 |
| 70 void InstantPage::SendThemeBackgroundInfo( | 74 void InstantPage::SendThemeBackgroundInfo( |
| 71 const ThemeBackgroundInfo& theme_info) { | 75 const ThemeBackgroundInfo& theme_info) { |
| 72 Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info)); | 76 Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info)); |
| 73 } | 77 } |
| 74 | 78 |
| 75 void InstantPage::SendThemeAreaHeight(int height) { | 79 void InstantPage::SendThemeAreaHeight(int height) { |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 233 |
| 230 void InstantPage::OnSearchBoxNavigate(int page_id, | 234 void InstantPage::OnSearchBoxNavigate(int page_id, |
| 231 const GURL& url, | 235 const GURL& url, |
| 232 content::PageTransition transition) { | 236 content::PageTransition transition) { |
| 233 if (contents()->IsActiveEntry(page_id)) { | 237 if (contents()->IsActiveEntry(page_id)) { |
| 234 OnInstantSupportDetermined(page_id, true); | 238 OnInstantSupportDetermined(page_id, true); |
| 235 if (ShouldProcessNavigateToURL()) | 239 if (ShouldProcessNavigateToURL()) |
| 236 delegate_->NavigateToURL(contents(), url, transition); | 240 delegate_->NavigateToURL(contents(), url, transition); |
| 237 } | 241 } |
| 238 } | 242 } |
| OLD | NEW |