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

Side by Side Diff: chrome/browser/ui/search/instant_page.cc

Issue 14646034: Add onfocuschange to the Extended Search API, with associated isFocused attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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
OLDNEW
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/ui/search/instant_page.h" 5 #include "chrome/browser/ui/search/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 "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void InstantPage::KeyCaptureChanged(bool is_key_capture_enabled) { 111 void InstantPage::KeyCaptureChanged(bool is_key_capture_enabled) {
112 Send(new ChromeViewMsg_SearchBoxKeyCaptureChanged( 112 Send(new ChromeViewMsg_SearchBoxKeyCaptureChanged(
113 routing_id(), is_key_capture_enabled)); 113 routing_id(), is_key_capture_enabled));
114 } 114 }
115 115
116 void InstantPage::SendMostVisitedItems( 116 void InstantPage::SendMostVisitedItems(
117 const std::vector<InstantMostVisitedItemIDPair>& items) { 117 const std::vector<InstantMostVisitedItemIDPair>& items) {
118 Send(new ChromeViewMsg_SearchBoxMostVisitedItemsChanged(routing_id(), items)); 118 Send(new ChromeViewMsg_SearchBoxMostVisitedItemsChanged(routing_id(), items));
119 } 119 }
120 120
121 void InstantPage::FocusChanged(bool is_focused) {
122 Send(new ChromeViewMsg_SearchBoxFocusChanged(routing_id(), is_focused));
123 }
124
121 InstantPage::InstantPage(Delegate* delegate, const std::string& instant_url) 125 InstantPage::InstantPage(Delegate* delegate, const std::string& instant_url)
122 : delegate_(delegate), 126 : delegate_(delegate),
123 instant_url_(instant_url), 127 instant_url_(instant_url),
124 supports_instant_(false), 128 supports_instant_(false),
125 instant_support_determined_(false) { 129 instant_support_determined_(false) {
126 } 130 }
127 131
128 void InstantPage::SetContents(content::WebContents* contents) { 132 void InstantPage::SetContents(content::WebContents* contents) {
129 Observe(contents); 133 Observe(contents);
130 } 134 }
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 delegate_->DeleteMostVisitedItem(restricted_id); 292 delegate_->DeleteMostVisitedItem(restricted_id);
289 } 293 }
290 294
291 void InstantPage::OnUndoMostVisitedDeletion(InstantRestrictedID restricted_id) { 295 void InstantPage::OnUndoMostVisitedDeletion(InstantRestrictedID restricted_id) {
292 delegate_->UndoMostVisitedDeletion(restricted_id); 296 delegate_->UndoMostVisitedDeletion(restricted_id);
293 } 297 }
294 298
295 void InstantPage::OnUndoAllMostVisitedDeletions() { 299 void InstantPage::OnUndoAllMostVisitedDeletions() {
296 delegate_->UndoAllMostVisitedDeletions(); 300 delegate_->UndoAllMostVisitedDeletions();
297 } 301 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698