| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // Sends ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem to the browser. | 52 // Sends ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem to the browser. |
| 53 void DeleteMostVisitedItem(uint64 most_visited_item_id); | 53 void DeleteMostVisitedItem(uint64 most_visited_item_id); |
| 54 | 54 |
| 55 // Sends ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion to the browser. | 55 // Sends ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion to the browser. |
| 56 void UndoMostVisitedDeletion(uint64 most_visited_item_id); | 56 void UndoMostVisitedDeletion(uint64 most_visited_item_id); |
| 57 | 57 |
| 58 // Sends ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions to the | 58 // Sends ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions to the |
| 59 // browser. | 59 // browser. |
| 60 void UndoAllMostVisitedDeletions(); | 60 void UndoAllMostVisitedDeletions(); |
| 61 | 61 |
| 62 // Shows any attached bars. |
| 63 void ShowBars(); |
| 64 |
| 65 // Hides any attached bars. When the bars are hidden, the "onbarshidden" |
| 66 // event is fired to notify the page. |
| 67 void HideBars(); |
| 68 |
| 62 const string16& query() const { return query_; } | 69 const string16& query() const { return query_; } |
| 63 bool verbatim() const { return verbatim_; } | 70 bool verbatim() const { return verbatim_; } |
| 64 size_t selection_start() const { return selection_start_; } | 71 size_t selection_start() const { return selection_start_; } |
| 65 size_t selection_end() const { return selection_end_; } | 72 size_t selection_end() const { return selection_end_; } |
| 66 int results_base() const { return results_base_; } | 73 int results_base() const { return results_base_; } |
| 67 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } | 74 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } |
| 68 bool display_instant_results() const { return display_instant_results_; } | 75 bool display_instant_results() const { return display_instant_results_; } |
| 69 const string16& omnibox_font() const { return omnibox_font_; } | 76 const string16& omnibox_font() const { return omnibox_font_; } |
| 70 size_t omnibox_font_size() const { return omnibox_font_size_; } | 77 size_t omnibox_font_size() const { return omnibox_font_size_; } |
| 71 | 78 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 91 virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; | 98 virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; |
| 92 | 99 |
| 93 void OnChange(const string16& query, | 100 void OnChange(const string16& query, |
| 94 bool verbatim, | 101 bool verbatim, |
| 95 size_t selection_start, | 102 size_t selection_start, |
| 96 size_t selection_end); | 103 size_t selection_end); |
| 97 void OnSubmit(const string16& query); | 104 void OnSubmit(const string16& query); |
| 98 void OnCancel(const string16& query); | 105 void OnCancel(const string16& query); |
| 99 void OnPopupResize(const gfx::Rect& bounds); | 106 void OnPopupResize(const gfx::Rect& bounds); |
| 100 void OnMarginChange(int margin, int width); | 107 void OnMarginChange(int margin, int width); |
| 108 void OnBarsHidden(); |
| 101 void OnDetermineIfPageSupportsInstant(); | 109 void OnDetermineIfPageSupportsInstant(); |
| 102 void OnAutocompleteResults( | 110 void OnAutocompleteResults( |
| 103 const std::vector<InstantAutocompleteResult>& results); | 111 const std::vector<InstantAutocompleteResult>& results); |
| 104 void OnUpOrDownKeyPressed(int count); | 112 void OnUpOrDownKeyPressed(int count); |
| 105 void OnCancelSelection(const string16& query); | 113 void OnCancelSelection(const string16& query); |
| 106 void OnKeyCaptureChange(bool is_key_capture_enabled); | 114 void OnKeyCaptureChange(bool is_key_capture_enabled); |
| 107 void OnSetDisplayInstantResults(bool display_instant_results); | 115 void OnSetDisplayInstantResults(bool display_instant_results); |
| 108 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); | 116 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); |
| 109 void OnThemeAreaHeightChanged(int height); | 117 void OnThemeAreaHeightChanged(int height); |
| 110 void OnFontInformationReceived(const string16& omnibox_font, | 118 void OnFontInformationReceived(const string16& omnibox_font, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 132 ThemeBackgroundInfo theme_info_; | 140 ThemeBackgroundInfo theme_info_; |
| 133 bool display_instant_results_; | 141 bool display_instant_results_; |
| 134 string16 omnibox_font_; | 142 string16 omnibox_font_; |
| 135 size_t omnibox_font_size_; | 143 size_t omnibox_font_size_; |
| 136 std::vector<InstantMostVisitedItem> most_visited_items_; | 144 std::vector<InstantMostVisitedItem> most_visited_items_; |
| 137 | 145 |
| 138 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 146 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
| 139 }; | 147 }; |
| 140 | 148 |
| 141 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 149 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
| OLD | NEW |