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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults( | 88 Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults( |
89 routing_id(), display_instant_results)); | 89 routing_id(), display_instant_results)); |
90 } | 90 } |
91 | 91 |
92 void InstantPage::KeyCaptureChanged(bool is_key_capture_enabled) { | 92 void InstantPage::KeyCaptureChanged(bool is_key_capture_enabled) { |
93 Send(new ChromeViewMsg_SearchBoxKeyCaptureChanged( | 93 Send(new ChromeViewMsg_SearchBoxKeyCaptureChanged( |
94 routing_id(), is_key_capture_enabled)); | 94 routing_id(), is_key_capture_enabled)); |
95 } | 95 } |
96 | 96 |
97 void InstantPage::SendMostVisitedItems( | 97 void InstantPage::SendMostVisitedItems( |
98 const std::vector<InstantMostVisitedItem>& items) { | 98 const std::vector<InstantMostVisitedItemIDPair>& items) { |
99 Send(new ChromeViewMsg_SearchBoxMostVisitedItemsChanged(routing_id(), items)); | 99 Send(new ChromeViewMsg_SearchBoxMostVisitedItemsChanged(routing_id(), items)); |
100 } | 100 } |
101 | 101 |
102 InstantPage::InstantPage(Delegate* delegate) | 102 InstantPage::InstantPage(Delegate* delegate) |
103 : delegate_(delegate), | 103 : delegate_(delegate), |
104 supports_instant_(false) { | 104 supports_instant_(false) { |
105 } | 105 } |
106 | 106 |
107 void InstantPage::SetContents(content::WebContents* contents) { | 107 void InstantPage::SetContents(content::WebContents* contents) { |
108 Observe(contents); | 108 Observe(contents); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 const GURL& url, | 263 const GURL& url, |
264 content::PageTransition transition, | 264 content::PageTransition transition, |
265 WindowOpenDisposition disposition) { | 265 WindowOpenDisposition disposition) { |
266 if (contents()->IsActiveEntry(page_id)) { | 266 if (contents()->IsActiveEntry(page_id)) { |
267 OnInstantSupportDetermined(page_id, true); | 267 OnInstantSupportDetermined(page_id, true); |
268 if (ShouldProcessNavigateToURL()) | 268 if (ShouldProcessNavigateToURL()) |
269 delegate_->NavigateToURL(contents(), url, transition, disposition); | 269 delegate_->NavigateToURL(contents(), url, transition, disposition); |
270 } | 270 } |
271 } | 271 } |
272 | 272 |
273 void InstantPage::OnDeleteMostVisitedItem(uint64 most_visited_item_id) { | 273 void InstantPage::OnDeleteMostVisitedItem(InstantRestrictedID restricted_id) { |
274 delegate_->DeleteMostVisitedItem(most_visited_item_id); | 274 delegate_->DeleteMostVisitedItem(restricted_id); |
275 } | 275 } |
276 | 276 |
277 void InstantPage::OnUndoMostVisitedDeletion(uint64 most_visited_item_id) { | 277 void InstantPage::OnUndoMostVisitedDeletion(InstantRestrictedID restricted_id) { |
278 delegate_->UndoMostVisitedDeletion(most_visited_item_id); | 278 delegate_->UndoMostVisitedDeletion(restricted_id); |
279 } | 279 } |
280 | 280 |
281 void InstantPage::OnUndoAllMostVisitedDeletions() { | 281 void InstantPage::OnUndoAllMostVisitedDeletions() { |
282 delegate_->UndoAllMostVisitedDeletions(); | 282 delegate_->UndoAllMostVisitedDeletions(); |
283 } | 283 } |
OLD | NEW |