OLD | NEW |
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/renderer/searchbox/searchbox.h" | 5 #include "chrome/renderer/searchbox/searchbox.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 void SearchBox::NavigateToURL(const GURL& url, | 147 void SearchBox::NavigateToURL(const GURL& url, |
148 content::PageTransition transition, | 148 content::PageTransition transition, |
149 WindowOpenDisposition disposition, | 149 WindowOpenDisposition disposition, |
150 bool is_search_type) { | 150 bool is_search_type) { |
151 render_view()->Send(new ChromeViewHostMsg_SearchBoxNavigate( | 151 render_view()->Send(new ChromeViewHostMsg_SearchBoxNavigate( |
152 render_view()->GetRoutingID(), render_view()->GetPageId(), | 152 render_view()->GetRoutingID(), render_view()->GetPageId(), |
153 url, transition, disposition, is_search_type)); | 153 url, transition, disposition, is_search_type)); |
154 } | 154 } |
155 | 155 |
| 156 void SearchBox::CountMouseover() { |
| 157 render_view()->Send(new ChromeViewHostMsg_CountMouseover( |
| 158 render_view()->GetRoutingID(), render_view()->GetPageId())); |
| 159 } |
| 160 |
156 void SearchBox::DeleteMostVisitedItem( | 161 void SearchBox::DeleteMostVisitedItem( |
157 InstantRestrictedID most_visited_item_id) { | 162 InstantRestrictedID most_visited_item_id) { |
158 render_view()->Send(new ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem( | 163 render_view()->Send(new ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem( |
159 render_view()->GetRoutingID(), render_view()->GetPageId(), | 164 render_view()->GetRoutingID(), render_view()->GetPageId(), |
160 GetURLForMostVisitedItem(most_visited_item_id))); | 165 GetURLForMostVisitedItem(most_visited_item_id))); |
161 } | 166 } |
162 | 167 |
163 void SearchBox::UndoMostVisitedDeletion( | 168 void SearchBox::UndoMostVisitedDeletion( |
164 InstantRestrictedID most_visited_item_id) { | 169 InstantRestrictedID most_visited_item_id) { |
165 render_view()->Send(new ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion( | 170 render_view()->Send(new ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion( |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 InstantMostVisitedItem item; | 564 InstantMostVisitedItem item; |
560 return GetMostVisitedItemWithID(item_id, &item) ? item.url : GURL(); | 565 return GetMostVisitedItemWithID(item_id, &item) ? item.url : GURL(); |
561 } | 566 } |
562 | 567 |
563 void SearchBox::OnToggleVoiceSearch() { | 568 void SearchBox::OnToggleVoiceSearch() { |
564 if (render_view()->GetWebView() && render_view()->GetWebView()->mainFrame()) { | 569 if (render_view()->GetWebView() && render_view()->GetWebView()->mainFrame()) { |
565 extensions_v8::SearchBoxExtension::DispatchToggleVoiceSearch( | 570 extensions_v8::SearchBoxExtension::DispatchToggleVoiceSearch( |
566 render_view()->GetWebView()->mainFrame()); | 571 render_view()->GetWebView()->mainFrame()); |
567 } | 572 } |
568 } | 573 } |
OLD | NEW |