| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 } | 316 } |
| 317 | 317 |
| 318 const ThemeBackgroundInfo& SearchBox::GetThemeBackgroundInfo() { | 318 const ThemeBackgroundInfo& SearchBox::GetThemeBackgroundInfo() { |
| 319 return theme_info_; | 319 return theme_info_; |
| 320 } | 320 } |
| 321 | 321 |
| 322 const EmbeddedSearchRequestParams& SearchBox::GetEmbeddedSearchRequestParams() { | 322 const EmbeddedSearchRequestParams& SearchBox::GetEmbeddedSearchRequestParams() { |
| 323 return embedded_search_request_params_; | 323 return embedded_search_request_params_; |
| 324 } | 324 } |
| 325 | 325 |
| 326 void SearchBox::Focus() { | |
| 327 render_view()->Send(new ChromeViewHostMsg_FocusOmnibox( | |
| 328 render_view()->GetRoutingID(), page_seq_no_, OMNIBOX_FOCUS_VISIBLE)); | |
| 329 } | |
| 330 | |
| 331 void SearchBox::Paste(const base::string16& text) { | 326 void SearchBox::Paste(const base::string16& text) { |
| 332 render_view()->Send(new ChromeViewHostMsg_PasteAndOpenDropdown( | 327 render_view()->Send(new ChromeViewHostMsg_PasteAndOpenDropdown( |
| 333 render_view()->GetRoutingID(), page_seq_no_, text)); | 328 render_view()->GetRoutingID(), page_seq_no_, text)); |
| 334 } | 329 } |
| 335 | 330 |
| 336 void SearchBox::StartCapturingKeyStrokes() { | 331 void SearchBox::StartCapturingKeyStrokes() { |
| 337 render_view()->Send(new ChromeViewHostMsg_FocusOmnibox( | 332 render_view()->Send(new ChromeViewHostMsg_FocusOmnibox( |
| 338 render_view()->GetRoutingID(), page_seq_no_, OMNIBOX_FOCUS_INVISIBLE)); | 333 render_view()->GetRoutingID(), page_seq_no_, OMNIBOX_FOCUS_INVISIBLE)); |
| 339 } | 334 } |
| 340 | 335 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 embedded_search_request_params_ = EmbeddedSearchRequestParams(); | 515 embedded_search_request_params_ = EmbeddedSearchRequestParams(); |
| 521 suggestion_ = InstantSuggestion(); | 516 suggestion_ = InstantSuggestion(); |
| 522 is_focused_ = false; | 517 is_focused_ = false; |
| 523 is_key_capture_enabled_ = false; | 518 is_key_capture_enabled_ = false; |
| 524 theme_info_ = ThemeBackgroundInfo(); | 519 theme_info_ = ThemeBackgroundInfo(); |
| 525 } | 520 } |
| 526 | 521 |
| 527 void SearchBox::OnDestruct() { | 522 void SearchBox::OnDestruct() { |
| 528 delete this; | 523 delete this; |
| 529 } | 524 } |
| OLD | NEW |