| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 323 |
| 324 const EmbeddedSearchRequestParams& SearchBox::GetEmbeddedSearchRequestParams() { | 324 const EmbeddedSearchRequestParams& SearchBox::GetEmbeddedSearchRequestParams() { |
| 325 return embedded_search_request_params_; | 325 return embedded_search_request_params_; |
| 326 } | 326 } |
| 327 | 327 |
| 328 void SearchBox::Focus() { | 328 void SearchBox::Focus() { |
| 329 render_view()->Send(new ChromeViewHostMsg_FocusOmnibox( | 329 render_view()->Send(new ChromeViewHostMsg_FocusOmnibox( |
| 330 render_view()->GetRoutingID(), page_seq_no_, OMNIBOX_FOCUS_VISIBLE)); | 330 render_view()->GetRoutingID(), page_seq_no_, OMNIBOX_FOCUS_VISIBLE)); |
| 331 } | 331 } |
| 332 | 332 |
| 333 void SearchBox::NavigateToURL(const GURL& url, | |
| 334 WindowOpenDisposition disposition) { | |
| 335 render_view()->Send(new ChromeViewHostMsg_SearchBoxNavigate( | |
| 336 render_view()->GetRoutingID(), page_seq_no_, url, disposition)); | |
| 337 } | |
| 338 | |
| 339 void SearchBox::Paste(const base::string16& text) { | 333 void SearchBox::Paste(const base::string16& text) { |
| 340 render_view()->Send(new ChromeViewHostMsg_PasteAndOpenDropdown( | 334 render_view()->Send(new ChromeViewHostMsg_PasteAndOpenDropdown( |
| 341 render_view()->GetRoutingID(), page_seq_no_, text)); | 335 render_view()->GetRoutingID(), page_seq_no_, text)); |
| 342 } | 336 } |
| 343 | 337 |
| 344 void SearchBox::StartCapturingKeyStrokes() { | 338 void SearchBox::StartCapturingKeyStrokes() { |
| 345 render_view()->Send(new ChromeViewHostMsg_FocusOmnibox( | 339 render_view()->Send(new ChromeViewHostMsg_FocusOmnibox( |
| 346 render_view()->GetRoutingID(), page_seq_no_, OMNIBOX_FOCUS_INVISIBLE)); | 340 render_view()->GetRoutingID(), page_seq_no_, OMNIBOX_FOCUS_INVISIBLE)); |
| 347 } | 341 } |
| 348 | 342 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 } | 530 } |
| 537 | 531 |
| 538 void SearchBox::Reset() { | 532 void SearchBox::Reset() { |
| 539 query_.clear(); | 533 query_.clear(); |
| 540 embedded_search_request_params_ = EmbeddedSearchRequestParams(); | 534 embedded_search_request_params_ = EmbeddedSearchRequestParams(); |
| 541 suggestion_ = InstantSuggestion(); | 535 suggestion_ = InstantSuggestion(); |
| 542 is_focused_ = false; | 536 is_focused_ = false; |
| 543 is_key_capture_enabled_ = false; | 537 is_key_capture_enabled_ = false; |
| 544 theme_info_ = ThemeBackgroundInfo(); | 538 theme_info_ = ThemeBackgroundInfo(); |
| 545 } | 539 } |
| OLD | NEW |