| 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/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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 void InstantPage::SendThemeBackgroundInfo( | 105 void InstantPage::SendThemeBackgroundInfo( |
| 106 const ThemeBackgroundInfo& theme_info) { | 106 const ThemeBackgroundInfo& theme_info) { |
| 107 Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info)); | 107 Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info)); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void InstantPage::SetDisplayInstantResults(bool display_instant_results) { | 110 void InstantPage::SetDisplayInstantResults(bool display_instant_results) { |
| 111 Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults( | 111 Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults( |
| 112 routing_id(), display_instant_results)); | 112 routing_id(), display_instant_results)); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void InstantPage::KeyCaptureChanged(bool is_key_capture_enabled) { | 115 void InstantPage::FocusChanged(OmniboxFocusState state, |
| 116 Send(new ChromeViewMsg_SearchBoxKeyCaptureChanged( | 116 OmniboxFocusChangeReason reason) { |
| 117 routing_id(), is_key_capture_enabled)); | 117 Send(new ChromeViewMsg_SearchBoxFocusChanged(routing_id(), state, reason)); |
| 118 } | 118 } |
| 119 | 119 |
| 120 void InstantPage::SendMostVisitedItems( | 120 void InstantPage::SendMostVisitedItems( |
| 121 const std::vector<InstantMostVisitedItemIDPair>& items) { | 121 const std::vector<InstantMostVisitedItemIDPair>& items) { |
| 122 Send(new ChromeViewMsg_SearchBoxMostVisitedItemsChanged(routing_id(), items)); | 122 Send(new ChromeViewMsg_SearchBoxMostVisitedItemsChanged(routing_id(), items)); |
| 123 } | 123 } |
| 124 | 124 |
| 125 InstantPage::InstantPage(Delegate* delegate, const std::string& instant_url) | 125 InstantPage::InstantPage(Delegate* delegate, const std::string& instant_url) |
| 126 : delegate_(delegate), | 126 : delegate_(delegate), |
| 127 instant_url_(instant_url), | 127 instant_url_(instant_url), |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 delegate_->DeleteMostVisitedItem(restricted_id); | 295 delegate_->DeleteMostVisitedItem(restricted_id); |
| 296 } | 296 } |
| 297 | 297 |
| 298 void InstantPage::OnUndoMostVisitedDeletion(InstantRestrictedID restricted_id) { | 298 void InstantPage::OnUndoMostVisitedDeletion(InstantRestrictedID restricted_id) { |
| 299 delegate_->UndoMostVisitedDeletion(restricted_id); | 299 delegate_->UndoMostVisitedDeletion(restricted_id); |
| 300 } | 300 } |
| 301 | 301 |
| 302 void InstantPage::OnUndoAllMostVisitedDeletions() { | 302 void InstantPage::OnUndoAllMostVisitedDeletions() { |
| 303 delegate_->UndoAllMostVisitedDeletions(); | 303 delegate_->UndoAllMostVisitedDeletions(); |
| 304 } | 304 } |
| OLD | NEW |