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 "chrome/common/render_messages.h" | 7 #include "chrome/common/render_messages.h" |
8 #include "chrome/renderer/searchbox/searchbox_extension.h" | 8 #include "chrome/renderer/searchbox/searchbox_extension.h" |
9 #include "content/public/renderer/render_view.h" | 9 #include "content/public/renderer/render_view.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 render_view()->Send(new ChromeViewHostMsg_StartCapturingKeyStrokes( | 52 render_view()->Send(new ChromeViewHostMsg_StartCapturingKeyStrokes( |
53 render_view()->GetRoutingID(), render_view()->GetPageId())); | 53 render_view()->GetRoutingID(), render_view()->GetPageId())); |
54 } | 54 } |
55 | 55 |
56 void SearchBox::StopCapturingKeyStrokes() { | 56 void SearchBox::StopCapturingKeyStrokes() { |
57 render_view()->Send(new ChromeViewHostMsg_StopCapturingKeyStrokes( | 57 render_view()->Send(new ChromeViewHostMsg_StopCapturingKeyStrokes( |
58 render_view()->GetRoutingID(), render_view()->GetPageId())); | 58 render_view()->GetRoutingID(), render_view()->GetPageId())); |
59 } | 59 } |
60 | 60 |
61 void SearchBox::NavigateToURL(const GURL& url, | 61 void SearchBox::NavigateToURL(const GURL& url, |
62 content::PageTransition transition) { | 62 content::PageTransition transition, |
| 63 WindowOpenDisposition disposition) { |
63 render_view()->Send(new ChromeViewHostMsg_SearchBoxNavigate( | 64 render_view()->Send(new ChromeViewHostMsg_SearchBoxNavigate( |
64 render_view()->GetRoutingID(), render_view()->GetPageId(), | 65 render_view()->GetRoutingID(), render_view()->GetPageId(), |
65 url, transition)); | 66 url, transition, disposition)); |
66 } | 67 } |
67 | 68 |
68 int SearchBox::GetStartMargin() const { | 69 int SearchBox::GetStartMargin() const { |
69 return static_cast<int>(start_margin_ / GetZoom()); | 70 return static_cast<int>(start_margin_ / GetZoom()); |
70 } | 71 } |
71 | 72 |
72 int SearchBox::GetEndMargin() const { | 73 int SearchBox::GetEndMargin() const { |
73 return static_cast<int>(end_margin_ / GetZoom()); | 74 return static_cast<int>(end_margin_ / GetZoom()); |
74 } | 75 } |
75 | 76 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 end_margin_ = 0; | 284 end_margin_ = 0; |
284 autocomplete_results_.clear(); | 285 autocomplete_results_.clear(); |
285 is_key_capture_enabled_ = false; | 286 is_key_capture_enabled_ = false; |
286 theme_info_ = ThemeBackgroundInfo(); | 287 theme_info_ = ThemeBackgroundInfo(); |
287 // Don't reset display_instant_results_ to prevent clearing it on committed | 288 // Don't reset display_instant_results_ to prevent clearing it on committed |
288 // results pages in extended mode. Otherwise resetting it is a no-op because | 289 // results pages in extended mode. Otherwise resetting it is a no-op because |
289 // a new loader is created when it changes; see crbug.com/164662. | 290 // a new loader is created when it changes; see crbug.com/164662. |
290 // Also don't reset omnibox_font_ or omnibox_font_size_ since it never | 291 // Also don't reset omnibox_font_ or omnibox_font_size_ since it never |
291 // changes. | 292 // changes. |
292 } | 293 } |
OLD | NEW |