OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 5 #ifndef CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
6 #define CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 6 #define CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 class SearchBox : public content::RenderViewObserver, | 25 class SearchBox : public content::RenderViewObserver, |
26 public content::RenderViewObserverTracker<SearchBox> { | 26 public content::RenderViewObserverTracker<SearchBox> { |
27 public: | 27 public: |
28 explicit SearchBox(content::RenderView* render_view); | 28 explicit SearchBox(content::RenderView* render_view); |
29 virtual ~SearchBox(); | 29 virtual ~SearchBox(); |
30 | 30 |
31 // Sends ViewHostMsg_SetSuggestions to the browser. | 31 // Sends ViewHostMsg_SetSuggestions to the browser. |
32 void SetSuggestions(const std::vector<InstantSuggestion>& suggestions); | 32 void SetSuggestions(const std::vector<InstantSuggestion>& suggestions); |
33 | 33 |
| 34 // Sends ViewHostMsg_OnWebSearchBoxBlur to the browser. |
| 35 void OnWebSearchBoxBlur(); |
| 36 |
| 37 // Sends ViewHostMsg_OnWebSearchBoxFocus to the browser. |
| 38 void OnWebSearchBoxFocus(); |
| 39 |
34 // Sends ViewHostMsg_ShowInstantPreview to the browser. | 40 // Sends ViewHostMsg_ShowInstantPreview to the browser. |
35 void ShowInstantPreview(InstantShownReason reason, | 41 void ShowInstantPreview(InstantShownReason reason, |
36 int height, | 42 int height, |
37 InstantSizeUnits units); | 43 InstantSizeUnits units); |
38 | 44 |
39 const string16& query() const { return query_; } | 45 const string16& query() const { return query_; } |
40 bool verbatim() const { return verbatim_; } | 46 bool verbatim() const { return verbatim_; } |
41 size_t selection_start() const { return selection_start_; } | 47 size_t selection_start() const { return selection_start_; } |
42 size_t selection_end() const { return selection_end_; } | 48 size_t selection_end() const { return selection_end_; } |
43 int results_base() const { return results_base_; } | 49 int results_base() const { return results_base_; } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 std::vector<InstantAutocompleteResult> autocomplete_results_; | 87 std::vector<InstantAutocompleteResult> autocomplete_results_; |
82 size_t last_results_base_; | 88 size_t last_results_base_; |
83 std::vector<InstantAutocompleteResult> last_autocomplete_results_; | 89 std::vector<InstantAutocompleteResult> last_autocomplete_results_; |
84 bool is_focused_; | 90 bool is_focused_; |
85 bool active_tab_is_ntp_; | 91 bool active_tab_is_ntp_; |
86 | 92 |
87 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 93 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
88 }; | 94 }; |
89 | 95 |
90 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 96 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
OLD | NEW |