Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: chrome/renderer/searchbox/searchbox.h

Issue 12631008: alternate ntp: implement Show/HideBars API to reduce jank when showing/hiding bars (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed build break Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Sends ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem to the browser. 54 // Sends ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem to the browser.
55 void DeleteMostVisitedItem(uint64 most_visited_item_id); 55 void DeleteMostVisitedItem(uint64 most_visited_item_id);
56 56
57 // Sends ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion to the browser. 57 // Sends ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion to the browser.
58 void UndoMostVisitedDeletion(uint64 most_visited_item_id); 58 void UndoMostVisitedDeletion(uint64 most_visited_item_id);
59 59
60 // Sends ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions to the 60 // Sends ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions to the
61 // browser. 61 // browser.
62 void UndoAllMostVisitedDeletions(); 62 void UndoAllMostVisitedDeletions();
63 63
64 // Shows any attached bars.
65 void ShowBars();
66
67 // Hides any attached bars. When the bars are hidden, the "onbarshidden"
68 // event is fired to notify the page.
69 void HideBars();
70
64 const string16& query() const { return query_; } 71 const string16& query() const { return query_; }
65 bool verbatim() const { return verbatim_; } 72 bool verbatim() const { return verbatim_; }
66 size_t selection_start() const { return selection_start_; } 73 size_t selection_start() const { return selection_start_; }
67 size_t selection_end() const { return selection_end_; } 74 size_t selection_end() const { return selection_end_; }
68 int results_base() const { return results_base_; } 75 int results_base() const { return results_base_; }
69 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } 76 bool is_key_capture_enabled() const { return is_key_capture_enabled_; }
70 bool display_instant_results() const { return display_instant_results_; } 77 bool display_instant_results() const { return display_instant_results_; }
71 const string16& omnibox_font() const { return omnibox_font_; } 78 const string16& omnibox_font() const { return omnibox_font_; }
72 size_t omnibox_font_size() const { return omnibox_font_size_; } 79 size_t omnibox_font_size() const { return omnibox_font_size_; }
73 80
(...skipping 19 matching lines...) Expand all
93 virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; 100 virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE;
94 101
95 void OnChange(const string16& query, 102 void OnChange(const string16& query,
96 bool verbatim, 103 bool verbatim,
97 size_t selection_start, 104 size_t selection_start,
98 size_t selection_end); 105 size_t selection_end);
99 void OnSubmit(const string16& query); 106 void OnSubmit(const string16& query);
100 void OnCancel(const string16& query); 107 void OnCancel(const string16& query);
101 void OnPopupResize(const gfx::Rect& bounds); 108 void OnPopupResize(const gfx::Rect& bounds);
102 void OnMarginChange(int margin, int width); 109 void OnMarginChange(int margin, int width);
110 void OnBarsHidden();
103 void OnDetermineIfPageSupportsInstant(); 111 void OnDetermineIfPageSupportsInstant();
104 void OnAutocompleteResults( 112 void OnAutocompleteResults(
105 const std::vector<InstantAutocompleteResult>& results); 113 const std::vector<InstantAutocompleteResult>& results);
106 void OnUpOrDownKeyPressed(int count); 114 void OnUpOrDownKeyPressed(int count);
107 void OnCancelSelection(const string16& query); 115 void OnCancelSelection(const string16& query);
108 void OnKeyCaptureChange(bool is_key_capture_enabled); 116 void OnKeyCaptureChange(bool is_key_capture_enabled);
109 void OnSetDisplayInstantResults(bool display_instant_results); 117 void OnSetDisplayInstantResults(bool display_instant_results);
110 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); 118 void OnThemeChanged(const ThemeBackgroundInfo& theme_info);
111 void OnThemeAreaHeightChanged(int height); 119 void OnThemeAreaHeightChanged(int height);
112 void OnFontInformationReceived(const string16& omnibox_font, 120 void OnFontInformationReceived(const string16& omnibox_font,
(...skipping 21 matching lines...) Expand all
134 ThemeBackgroundInfo theme_info_; 142 ThemeBackgroundInfo theme_info_;
135 bool display_instant_results_; 143 bool display_instant_results_;
136 string16 omnibox_font_; 144 string16 omnibox_font_;
137 size_t omnibox_font_size_; 145 size_t omnibox_font_size_;
138 std::vector<InstantMostVisitedItem> most_visited_items_; 146 std::vector<InstantMostVisitedItem> most_visited_items_;
139 147
140 DISALLOW_COPY_AND_ASSIGN(SearchBox); 148 DISALLOW_COPY_AND_ASSIGN(SearchBox);
141 }; 149 };
142 150
143 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ 151 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/searchbox_api.js ('k') | chrome/renderer/searchbox/searchbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698