| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 224 |
| 225 void SearchBox::NavigateToURL(const GURL& url, | 225 void SearchBox::NavigateToURL(const GURL& url, |
| 226 content::PageTransition transition, | 226 content::PageTransition transition, |
| 227 WindowOpenDisposition disposition, | 227 WindowOpenDisposition disposition, |
| 228 bool is_search_type) { | 228 bool is_search_type) { |
| 229 render_view()->Send(new ChromeViewHostMsg_SearchBoxNavigate( | 229 render_view()->Send(new ChromeViewHostMsg_SearchBoxNavigate( |
| 230 render_view()->GetRoutingID(), render_view()->GetPageId(), | 230 render_view()->GetRoutingID(), render_view()->GetPageId(), |
| 231 url, transition, disposition, is_search_type)); | 231 url, transition, disposition, is_search_type)); |
| 232 } | 232 } |
| 233 | 233 |
| 234 void SearchBox::Paste(const string16& text) { |
| 235 render_view()->Send(new ChromeViewHostMsg_PasteAndOpenDropdown( |
| 236 render_view()->GetRoutingID(), render_view()->GetPageId(), text)); |
| 237 } |
| 238 |
| 234 void SearchBox::SetVoiceSearchSupported(bool supported) { | 239 void SearchBox::SetVoiceSearchSupported(bool supported) { |
| 235 render_view()->Send(new ChromeViewHostMsg_SetVoiceSearchSupported( | 240 render_view()->Send(new ChromeViewHostMsg_SetVoiceSearchSupported( |
| 236 render_view()->GetRoutingID(), render_view()->GetPageId(), supported)); | 241 render_view()->GetRoutingID(), render_view()->GetPageId(), supported)); |
| 237 } | 242 } |
| 238 | 243 |
| 239 void SearchBox::StartCapturingKeyStrokes() { | 244 void SearchBox::StartCapturingKeyStrokes() { |
| 240 render_view()->Send(new ChromeViewHostMsg_FocusOmnibox( | 245 render_view()->Send(new ChromeViewHostMsg_FocusOmnibox( |
| 241 render_view()->GetRoutingID(), render_view()->GetPageId(), | 246 render_view()->GetRoutingID(), render_view()->GetPageId(), |
| 242 OMNIBOX_FOCUS_INVISIBLE)); | 247 OMNIBOX_FOCUS_INVISIBLE)); |
| 243 } | 248 } |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 } | 421 } |
| 417 | 422 |
| 418 void SearchBox::Reset() { | 423 void SearchBox::Reset() { |
| 419 query_.clear(); | 424 query_.clear(); |
| 420 start_margin_ = 0; | 425 start_margin_ = 0; |
| 421 width_ = 0; | 426 width_ = 0; |
| 422 is_focused_ = false; | 427 is_focused_ = false; |
| 423 is_key_capture_enabled_ = false; | 428 is_key_capture_enabled_ = false; |
| 424 theme_info_ = ThemeBackgroundInfo(); | 429 theme_info_ = ThemeBackgroundInfo(); |
| 425 } | 430 } |
| OLD | NEW |