| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 void InstantPage::SendThemeBackgroundInfo( | 101 void InstantPage::SendThemeBackgroundInfo( |
| 102 const ThemeBackgroundInfo& theme_info) { | 102 const ThemeBackgroundInfo& theme_info) { |
| 103 Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info)); | 103 Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info)); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void InstantPage::SetDisplayInstantResults(bool display_instant_results) { | 106 void InstantPage::SetDisplayInstantResults(bool display_instant_results) { |
| 107 Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults( | 107 Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults( |
| 108 routing_id(), display_instant_results)); | 108 routing_id(), display_instant_results)); |
| 109 } | 109 } |
| 110 | 110 |
| 111 void InstantPage::KeyCaptureChanged(bool is_key_capture_enabled) { | 111 void InstantPage::KeyCaptureChanged(OmniboxFocusState state, |
| 112 OmniboxFocusChangeReason reason) { |
| 112 Send(new ChromeViewMsg_SearchBoxKeyCaptureChanged( | 113 Send(new ChromeViewMsg_SearchBoxKeyCaptureChanged( |
| 113 routing_id(), is_key_capture_enabled)); | 114 routing_id(), state, reason)); |
| 114 } | 115 } |
| 115 | 116 |
| 116 void InstantPage::SendMostVisitedItems( | 117 void InstantPage::SendMostVisitedItems( |
| 117 const std::vector<InstantMostVisitedItemIDPair>& items) { | 118 const std::vector<InstantMostVisitedItemIDPair>& items) { |
| 118 Send(new ChromeViewMsg_SearchBoxMostVisitedItemsChanged(routing_id(), items)); | 119 Send(new ChromeViewMsg_SearchBoxMostVisitedItemsChanged(routing_id(), items)); |
| 119 } | 120 } |
| 120 | 121 |
| 121 InstantPage::InstantPage(Delegate* delegate, const std::string& instant_url) | 122 InstantPage::InstantPage(Delegate* delegate, const std::string& instant_url) |
| 122 : delegate_(delegate), | 123 : delegate_(delegate), |
| 123 instant_url_(instant_url), | 124 instant_url_(instant_url), |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 delegate_->DeleteMostVisitedItem(restricted_id); | 289 delegate_->DeleteMostVisitedItem(restricted_id); |
| 289 } | 290 } |
| 290 | 291 |
| 291 void InstantPage::OnUndoMostVisitedDeletion(InstantRestrictedID restricted_id) { | 292 void InstantPage::OnUndoMostVisitedDeletion(InstantRestrictedID restricted_id) { |
| 292 delegate_->UndoMostVisitedDeletion(restricted_id); | 293 delegate_->UndoMostVisitedDeletion(restricted_id); |
| 293 } | 294 } |
| 294 | 295 |
| 295 void InstantPage::OnUndoAllMostVisitedDeletions() { | 296 void InstantPage::OnUndoAllMostVisitedDeletions() { |
| 296 delegate_->UndoAllMostVisitedDeletions(); | 297 delegate_->UndoAllMostVisitedDeletions(); |
| 297 } | 298 } |
| OLD | NEW |