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 "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/renderer/searchbox/searchbox_extension.h" | 9 #include "chrome/renderer/searchbox/searchbox_extension.h" |
10 #include "content/public/renderer/render_view.h" | 10 #include "content/public/renderer/render_view.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 render_view()->Send(new ChromeViewHostMsg_StartCapturingKeyStrokes( | 64 render_view()->Send(new ChromeViewHostMsg_StartCapturingKeyStrokes( |
65 render_view()->GetRoutingID(), render_view()->GetPageId())); | 65 render_view()->GetRoutingID(), render_view()->GetPageId())); |
66 } | 66 } |
67 | 67 |
68 void SearchBox::StopCapturingKeyStrokes() { | 68 void SearchBox::StopCapturingKeyStrokes() { |
69 render_view()->Send(new ChromeViewHostMsg_StopCapturingKeyStrokes( | 69 render_view()->Send(new ChromeViewHostMsg_StopCapturingKeyStrokes( |
70 render_view()->GetRoutingID(), render_view()->GetPageId())); | 70 render_view()->GetRoutingID(), render_view()->GetPageId())); |
71 } | 71 } |
72 | 72 |
73 void SearchBox::NavigateToURL(const GURL& url, | 73 void SearchBox::NavigateToURL(const GURL& url, |
74 content::PageTransition transition) { | 74 content::PageTransition transition, |
| 75 WindowOpenDisposition disposition) { |
75 render_view()->Send(new ChromeViewHostMsg_SearchBoxNavigate( | 76 render_view()->Send(new ChromeViewHostMsg_SearchBoxNavigate( |
76 render_view()->GetRoutingID(), render_view()->GetPageId(), | 77 render_view()->GetRoutingID(), render_view()->GetPageId(), |
77 url, transition)); | 78 url, transition, disposition)); |
78 } | 79 } |
79 | 80 |
80 void SearchBox::DeleteMostVisitedItem(int restrict_id) { | 81 void SearchBox::DeleteMostVisitedItem(int restrict_id) { |
81 string16 url = RestrictedIdToURL(restrict_id); | 82 string16 url = RestrictedIdToURL(restrict_id); |
82 render_view()->Send(new ChromeViewHostMsg_InstantDeleteMostVisitedItem( | 83 render_view()->Send(new ChromeViewHostMsg_InstantDeleteMostVisitedItem( |
83 render_view()->GetRoutingID(), GURL(url))); | 84 render_view()->GetRoutingID(), GURL(url))); |
84 } | 85 } |
85 | 86 |
86 void SearchBox::UndoMostVisitedDeletion(int restrict_id) { | 87 void SearchBox::UndoMostVisitedDeletion(int restrict_id) { |
87 string16 url = RestrictedIdToURL(restrict_id); | 88 string16 url = RestrictedIdToURL(restrict_id); |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 GURL url = GURL(ostr.str()); | 358 GURL url = GURL(ostr.str()); |
358 return UTF8ToUTF16(url.spec()); | 359 return UTF8ToUTF16(url.spec()); |
359 } | 360 } |
360 | 361 |
361 string16 SearchBox::GenerateFaviconUrl(int id) { | 362 string16 SearchBox::GenerateFaviconUrl(int id) { |
362 std::ostringstream ostr; | 363 std::ostringstream ostr; |
363 ostr << kFaviconUrlPrefix << id; | 364 ostr << kFaviconUrlPrefix << id; |
364 GURL url = GURL(ostr.str()); | 365 GURL url = GURL(ostr.str()); |
365 return UTF8ToUTF16(url.spec()); | 366 return UTF8ToUTF16(url.spec()); |
366 } | 367 } |
OLD | NEW |