| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 render_view()->Send(new ChromeViewHostMsg_StartCapturingKeyStrokes( | 53 render_view()->Send(new ChromeViewHostMsg_StartCapturingKeyStrokes( |
| 54 render_view()->GetRoutingID(), render_view()->GetPageId())); | 54 render_view()->GetRoutingID(), render_view()->GetPageId())); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void SearchBox::StopCapturingKeyStrokes() { | 57 void SearchBox::StopCapturingKeyStrokes() { |
| 58 render_view()->Send(new ChromeViewHostMsg_StopCapturingKeyStrokes( | 58 render_view()->Send(new ChromeViewHostMsg_StopCapturingKeyStrokes( |
| 59 render_view()->GetRoutingID(), render_view()->GetPageId())); | 59 render_view()->GetRoutingID(), render_view()->GetPageId())); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void SearchBox::NavigateToURL(const GURL& url, | 62 void SearchBox::NavigateToURL(const GURL& url, |
| 63 content::PageTransition transition) { | 63 content::PageTransition transition, |
| 64 WindowOpenDisposition disposition) { |
| 64 render_view()->Send(new ChromeViewHostMsg_SearchBoxNavigate( | 65 render_view()->Send(new ChromeViewHostMsg_SearchBoxNavigate( |
| 65 render_view()->GetRoutingID(), render_view()->GetPageId(), | 66 render_view()->GetRoutingID(), render_view()->GetPageId(), |
| 66 url, transition)); | 67 url, transition, disposition)); |
| 67 } | 68 } |
| 68 | 69 |
| 69 int SearchBox::GetStartMargin() const { | 70 int SearchBox::GetStartMargin() const { |
| 70 return static_cast<int>(start_margin_ / GetZoom()); | 71 return static_cast<int>(start_margin_ / GetZoom()); |
| 71 } | 72 } |
| 72 | 73 |
| 73 int SearchBox::GetEndMargin() const { | 74 int SearchBox::GetEndMargin() const { |
| 74 return static_cast<int>(end_margin_ / GetZoom()); | 75 return static_cast<int>(end_margin_ / GetZoom()); |
| 75 } | 76 } |
| 76 | 77 |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 is_key_capture_enabled_ = false; | 298 is_key_capture_enabled_ = false; |
| 298 mode_ = chrome::search::Mode(); | 299 mode_ = chrome::search::Mode(); |
| 299 theme_info_ = ThemeBackgroundInfo(); | 300 theme_info_ = ThemeBackgroundInfo(); |
| 300 theme_area_height_ = 0; | 301 theme_area_height_ = 0; |
| 301 // Don't reset display_instant_results_ to prevent clearing it on committed | 302 // Don't reset display_instant_results_ to prevent clearing it on committed |
| 302 // results pages in extended mode. Otherwise resetting it is a no-op because | 303 // results pages in extended mode. Otherwise resetting it is a no-op because |
| 303 // a new loader is created when it changes; see crbug.com/164662. | 304 // a new loader is created when it changes; see crbug.com/164662. |
| 304 // Also don't reset omnibox_font_ or omnibox_font_size_ since it never | 305 // Also don't reset omnibox_font_ or omnibox_font_size_ since it never |
| 305 // changes. | 306 // changes. |
| 306 } | 307 } |
| OLD | NEW |