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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h

Issue 6731036: Enabled pressing TAB to cycle through the Omnibox results. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 8 years, 10 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 size_t index, 47 size_t index,
48 const string16& keyword) OVERRIDE; 48 const string16& keyword) OVERRIDE;
49 virtual string16 GetText() const OVERRIDE; 49 virtual string16 GetText() const OVERRIDE;
50 virtual bool IsEditingOrEmpty() const OVERRIDE; 50 virtual bool IsEditingOrEmpty() const OVERRIDE;
51 virtual int GetIcon() const OVERRIDE; 51 virtual int GetIcon() const OVERRIDE;
52 virtual void SetUserText(const string16& text) OVERRIDE; 52 virtual void SetUserText(const string16& text) OVERRIDE;
53 virtual void SetUserText(const string16& text, 53 virtual void SetUserText(const string16& text,
54 const string16& display_text, 54 const string16& display_text,
55 bool update_popup) OVERRIDE; 55 bool update_popup) OVERRIDE;
56 virtual void SetWindowTextAndCaretPos(const string16& text, 56 virtual void SetWindowTextAndCaretPos(const string16& text,
57 size_t caret_pos) OVERRIDE; 57 size_t caret_pos,
58 bool update_popup,
59 bool notify_text_changed) OVERRIDE;
58 virtual void SetForcedQuery() OVERRIDE; 60 virtual void SetForcedQuery() OVERRIDE;
59 virtual bool IsSelectAll() OVERRIDE; 61 virtual bool IsSelectAll() OVERRIDE;
60 virtual bool DeleteAtEndPressed() OVERRIDE; 62 virtual bool DeleteAtEndPressed() OVERRIDE;
61 virtual void GetSelectionBounds(string16::size_type* start, 63 virtual void GetSelectionBounds(string16::size_type* start,
62 string16::size_type* end) const OVERRIDE; 64 string16::size_type* end) const OVERRIDE;
63 virtual void SelectAll(bool reversed) OVERRIDE; 65 virtual void SelectAll(bool reversed) OVERRIDE;
64 virtual void RevertAll() OVERRIDE; 66 virtual void RevertAll() OVERRIDE;
65 virtual void UpdatePopup() OVERRIDE; 67 virtual void UpdatePopup() OVERRIDE;
66 virtual void ClosePopup() OVERRIDE; 68 virtual void ClosePopup() OVERRIDE;
67 virtual void SetFocus() OVERRIDE; 69 virtual void SetFocus() OVERRIDE;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 NSString* GetNonSuggestTextSubstring() const; 159 NSString* GetNonSuggestTextSubstring() const;
158 160
159 // Returns the suggest portion of |field_|'s string value. 161 // Returns the suggest portion of |field_|'s string value.
160 NSString* GetSuggestTextSubstring() const; 162 NSString* GetSuggestTextSubstring() const;
161 163
162 // Pass the current content of |field_| to SetText(), maintaining 164 // Pass the current content of |field_| to SetText(), maintaining
163 // any selection. Named to be consistent with GTK and Windows, 165 // any selection. Named to be consistent with GTK and Windows,
164 // though here we cannot really do the in-place operation they do. 166 // though here we cannot really do the in-place operation they do.
165 void EmphasizeURLComponents(); 167 void EmphasizeURLComponents();
166 168
169 // Internally invoked whenever the text changes in some way.
170 void TextChanged();
171
167 // Calculates text attributes according to |display_text| and applies them 172 // Calculates text attributes according to |display_text| and applies them
168 // to the given |as| object. 173 // to the given |as| object.
169 void ApplyTextAttributes(const string16& display_text, 174 void ApplyTextAttributes(const string16& display_text,
170 NSMutableAttributedString* as); 175 NSMutableAttributedString* as);
171 176
172 // Return the number of UTF-16 units in the current buffer, excluding the 177 // Return the number of UTF-16 units in the current buffer, excluding the
173 // suggested text. 178 // suggested text.
174 NSUInteger GetTextLength() const; 179 NSUInteger GetTextLength() const;
175 180
176 // Places the caret at the given position. This clears any selection. 181 // Places the caret at the given position. This clears any selection.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // Was the delete key pressed with an empty selection at the end of the edit? 216 // Was the delete key pressed with an empty selection at the end of the edit?
212 bool delete_at_end_pressed_; 217 bool delete_at_end_pressed_;
213 218
214 // The maximum/standard line height for the displayed text. 219 // The maximum/standard line height for the displayed text.
215 CGFloat line_height_; 220 CGFloat line_height_;
216 221
217 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); 222 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac);
218 }; 223 };
219 224
220 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 225 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698