Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: chrome/browser/instant/instant_client.cc

Issue 11889003: Fixing ESC in instant-extended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reworked to send ESC down to JS, added test. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_client.h" 5 #include "chrome/browser/instant/instant_client.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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 void InstantClient::SendAutocompleteResults( 64 void InstantClient::SendAutocompleteResults(
65 const std::vector<InstantAutocompleteResult>& results) { 65 const std::vector<InstantAutocompleteResult>& results) {
66 Send(new ChromeViewMsg_SearchBoxAutocompleteResults(routing_id(), results)); 66 Send(new ChromeViewMsg_SearchBoxAutocompleteResults(routing_id(), results));
67 } 67 }
68 68
69 void InstantClient::UpOrDownKeyPressed(int count) { 69 void InstantClient::UpOrDownKeyPressed(int count) {
70 Send(new ChromeViewMsg_SearchBoxUpOrDownKeyPressed(routing_id(), count)); 70 Send(new ChromeViewMsg_SearchBoxUpOrDownKeyPressed(routing_id(), count));
71 } 71 }
72 72
73 void InstantClient::EscKeyPressed() {
74 Send(new ChromeViewMsg_SearchBoxEscKeyPressed(routing_id()));
75 }
76
73 void InstantClient::SearchModeChanged(const chrome::search::Mode& mode) { 77 void InstantClient::SearchModeChanged(const chrome::search::Mode& mode) {
74 Send(new ChromeViewMsg_SearchBoxModeChanged(routing_id(), mode)); 78 Send(new ChromeViewMsg_SearchBoxModeChanged(routing_id(), mode));
75 } 79 }
76 80
77 void InstantClient::SendThemeBackgroundInfo( 81 void InstantClient::SendThemeBackgroundInfo(
78 const ThemeBackgroundInfo& theme_info) { 82 const ThemeBackgroundInfo& theme_info) {
79 Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info)); 83 Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info));
80 } 84 }
81 85
82 void InstantClient::SendThemeAreaHeight(int height) { 86 void InstantClient::SendThemeAreaHeight(int height) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (web_contents()->IsActiveEntry(page_id)) 174 if (web_contents()->IsActiveEntry(page_id))
171 delegate_->StopCapturingKeyStrokes(); 175 delegate_->StopCapturingKeyStrokes();
172 } 176 }
173 177
174 void InstantClient::SearchBoxNavigate(int page_id, 178 void InstantClient::SearchBoxNavigate(int page_id,
175 const GURL& url, 179 const GURL& url,
176 content::PageTransition transition) { 180 content::PageTransition transition) {
177 if (web_contents()->IsActiveEntry(page_id)) 181 if (web_contents()->IsActiveEntry(page_id))
178 delegate_->NavigateToURL(url, transition); 182 delegate_->NavigateToURL(url, transition);
179 } 183 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698