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

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

Issue 14646034: Add onfocuschange to the Extended Search API, with associated isFocused attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 const string16& query() const { return query_; } 63 const string16& query() const { return query_; }
64 bool verbatim() const { return verbatim_; } 64 bool verbatim() const { return verbatim_; }
65 bool query_is_restricted() const { return query_is_restricted_; } 65 bool query_is_restricted() const { return query_is_restricted_; }
66 size_t selection_start() const { return selection_start_; } 66 size_t selection_start() const { return selection_start_; }
67 size_t selection_end() const { return selection_end_; } 67 size_t selection_end() const { return selection_end_; }
68 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } 68 bool is_key_capture_enabled() const { return is_key_capture_enabled_; }
69 bool display_instant_results() const { return display_instant_results_; } 69 bool display_instant_results() const { return display_instant_results_; }
70 const string16& omnibox_font() const { return omnibox_font_; } 70 const string16& omnibox_font() const { return omnibox_font_; }
71 size_t omnibox_font_size() const { return omnibox_font_size_; } 71 size_t omnibox_font_size() const { return omnibox_font_size_; }
72 bool is_focused() const { return is_focused_; }
72 73
73 // In extended Instant, returns the start-edge margin of the location bar in 74 // In extended Instant, returns the start-edge margin of the location bar in
74 // screen pixels. 75 // screen pixels.
75 int GetStartMargin() const; 76 int GetStartMargin() const;
76 77
77 // Returns the bounds of the omnibox popup in screen coordinates. 78 // Returns the bounds of the omnibox popup in screen coordinates.
78 gfx::Rect GetPopupBounds() const; 79 gfx::Rect GetPopupBounds() const;
79 80
80 const ThemeBackgroundInfo& GetThemeBackgroundInfo(); 81 const ThemeBackgroundInfo& GetThemeBackgroundInfo();
81 82
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 size_t selection_start, 136 size_t selection_start,
136 size_t selection_end); 137 size_t selection_end);
137 void OnKeyCaptureChange(bool is_key_capture_enabled); 138 void OnKeyCaptureChange(bool is_key_capture_enabled);
138 void OnSetDisplayInstantResults(bool display_instant_results); 139 void OnSetDisplayInstantResults(bool display_instant_results);
139 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); 140 void OnThemeChanged(const ThemeBackgroundInfo& theme_info);
140 void OnThemeAreaHeightChanged(int height); 141 void OnThemeAreaHeightChanged(int height);
141 void OnFontInformationReceived(const string16& omnibox_font, 142 void OnFontInformationReceived(const string16& omnibox_font,
142 size_t omnibox_font_size); 143 size_t omnibox_font_size);
143 void OnMostVisitedChanged( 144 void OnMostVisitedChanged(
144 const std::vector<InstantMostVisitedItemIDPair>& items); 145 const std::vector<InstantMostVisitedItemIDPair>& items);
145 146
melevin 2013/05/09 16:41:11 No newline here.
147 void OnFocusChanged(bool is_focused);
148
146 // Returns the current zoom factor of the render view or 1 on failure. 149 // Returns the current zoom factor of the render view or 1 on failure.
147 double GetZoom() const; 150 double GetZoom() const;
148 151
149 // Sets the searchbox values to their initial value. 152 // Sets the searchbox values to their initial value.
150 void Reset(); 153 void Reset();
151 154
152 // Sets the query to a new value. 155 // Sets the query to a new value.
153 void SetQuery(const string16& query, bool verbatim); 156 void SetQuery(const string16& query, bool verbatim);
154 157
155 string16 query_; 158 string16 query_;
156 bool verbatim_; 159 bool verbatim_;
157 bool query_is_restricted_; 160 bool query_is_restricted_;
158 size_t selection_start_; 161 size_t selection_start_;
159 size_t selection_end_; 162 size_t selection_end_;
160 int start_margin_; 163 int start_margin_;
161 gfx::Rect popup_bounds_; 164 gfx::Rect popup_bounds_;
162 bool is_key_capture_enabled_; 165 bool is_key_capture_enabled_;
163 ThemeBackgroundInfo theme_info_; 166 ThemeBackgroundInfo theme_info_;
164 bool display_instant_results_; 167 bool display_instant_results_;
165 string16 omnibox_font_; 168 string16 omnibox_font_;
166 size_t omnibox_font_size_; 169 size_t omnibox_font_size_;
170 bool is_focused_;
167 InstantRestrictedIDCache<InstantAutocompleteResult> 171 InstantRestrictedIDCache<InstantAutocompleteResult>
168 autocomplete_results_cache_; 172 autocomplete_results_cache_;
169 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; 173 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_;
170 174
171 DISALLOW_COPY_AND_ASSIGN(SearchBox); 175 DISALLOW_COPY_AND_ASSIGN(SearchBox);
172 }; 176 };
173 177
174 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ 178 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698