| 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 #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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 // Sends ChromeViewHostMsg_InstantDeleteMostVisitedItem to the browser. | 52 // Sends ChromeViewHostMsg_InstantDeleteMostVisitedItem to the browser. |
| 53 void DeleteMostVisitedItem(int restrict_id); | 53 void DeleteMostVisitedItem(int restrict_id); |
| 54 | 54 |
| 55 // Sends ChromeViewHostMsg_InstantUndoMostVisitedDeletion to the browser. | 55 // Sends ChromeViewHostMsg_InstantUndoMostVisitedDeletion to the browser. |
| 56 void UndoMostVisitedDeletion(int restrict_id); | 56 void UndoMostVisitedDeletion(int restrict_id); |
| 57 | 57 |
| 58 // Sends ChromeViewHostMsg_InstantUndoAllMostVisitedDeletions to the browser. | 58 // Sends ChromeViewHostMsg_InstantUndoAllMostVisitedDeletions to the browser. |
| 59 void UndoAllMostVisitedDeletions(); | 59 void UndoAllMostVisitedDeletions(); |
| 60 | 60 |
| 61 // Shows any attached bars. |
| 62 void ShowBars(); |
| 63 |
| 64 // Hides any attached bars. When the bars are hidden, the "onbarshidden" |
| 65 // event is fired to notify the page. |
| 66 void HideBars(); |
| 67 |
| 61 const string16& query() const { return query_; } | 68 const string16& query() const { return query_; } |
| 62 bool verbatim() const { return verbatim_; } | 69 bool verbatim() const { return verbatim_; } |
| 63 size_t selection_start() const { return selection_start_; } | 70 size_t selection_start() const { return selection_start_; } |
| 64 size_t selection_end() const { return selection_end_; } | 71 size_t selection_end() const { return selection_end_; } |
| 65 int results_base() const { return results_base_; } | 72 int results_base() const { return results_base_; } |
| 66 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } | 73 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } |
| 67 bool display_instant_results() const { return display_instant_results_; } | 74 bool display_instant_results() const { return display_instant_results_; } |
| 68 const string16& omnibox_font() const { return omnibox_font_; } | 75 const string16& omnibox_font() const { return omnibox_font_; } |
| 69 size_t omnibox_font_size() const { return omnibox_font_size_; } | 76 size_t omnibox_font_size() const { return omnibox_font_size_; } |
| 70 | 77 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 96 virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; | 103 virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; |
| 97 | 104 |
| 98 void OnChange(const string16& query, | 105 void OnChange(const string16& query, |
| 99 bool verbatim, | 106 bool verbatim, |
| 100 size_t selection_start, | 107 size_t selection_start, |
| 101 size_t selection_end); | 108 size_t selection_end); |
| 102 void OnSubmit(const string16& query); | 109 void OnSubmit(const string16& query); |
| 103 void OnCancel(const string16& query); | 110 void OnCancel(const string16& query); |
| 104 void OnPopupResize(const gfx::Rect& bounds); | 111 void OnPopupResize(const gfx::Rect& bounds); |
| 105 void OnMarginChange(int margin, int width); | 112 void OnMarginChange(int margin, int width); |
| 113 void OnBarsHidden(); |
| 106 void OnDetermineIfPageSupportsInstant(); | 114 void OnDetermineIfPageSupportsInstant(); |
| 107 void OnAutocompleteResults( | 115 void OnAutocompleteResults( |
| 108 const std::vector<InstantAutocompleteResult>& results); | 116 const std::vector<InstantAutocompleteResult>& results); |
| 109 void OnUpOrDownKeyPressed(int count); | 117 void OnUpOrDownKeyPressed(int count); |
| 110 void OnCancelSelection(const string16& query); | 118 void OnCancelSelection(const string16& query); |
| 111 void OnKeyCaptureChange(bool is_key_capture_enabled); | 119 void OnKeyCaptureChange(bool is_key_capture_enabled); |
| 112 void OnSetDisplayInstantResults(bool display_instant_results); | 120 void OnSetDisplayInstantResults(bool display_instant_results); |
| 113 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); | 121 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); |
| 114 void OnThemeAreaHeightChanged(int height); | 122 void OnThemeAreaHeightChanged(int height); |
| 115 void OnFontInformationReceived(const string16& omnibox_font, | 123 void OnFontInformationReceived(const string16& omnibox_font, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 144 // TODO(dcblack): Unify this logic to work with both Most Visited and | 152 // TODO(dcblack): Unify this logic to work with both Most Visited and |
| 145 // history suggestions. (crbug/175768) | 153 // history suggestions. (crbug/175768) |
| 146 std::map<string16, int> url_to_restricted_id_map_; | 154 std::map<string16, int> url_to_restricted_id_map_; |
| 147 std::map<int, string16> restricted_id_to_url_map_; | 155 std::map<int, string16> restricted_id_to_url_map_; |
| 148 int last_restricted_id_; | 156 int last_restricted_id_; |
| 149 | 157 |
| 150 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 158 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
| 151 }; | 159 }; |
| 152 | 160 |
| 153 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 161 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
| OLD | NEW |