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

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

Issue 9419043: Revert 122412 - Enabled pressing TAB to traverse through the Omnibox results (Closed) Base URL: svn://svn.chromium.org/chrome/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, 57 size_t caret_pos) OVERRIDE;
58 bool update_popup,
59 bool notify_text_changed) OVERRIDE;
60 virtual void SetForcedQuery() OVERRIDE; 58 virtual void SetForcedQuery() OVERRIDE;
61 virtual bool IsSelectAll() OVERRIDE; 59 virtual bool IsSelectAll() OVERRIDE;
62 virtual bool DeleteAtEndPressed() OVERRIDE; 60 virtual bool DeleteAtEndPressed() OVERRIDE;
63 virtual void GetSelectionBounds(string16::size_type* start, 61 virtual void GetSelectionBounds(string16::size_type* start,
64 string16::size_type* end) const OVERRIDE; 62 string16::size_type* end) const OVERRIDE;
65 virtual void SelectAll(bool reversed) OVERRIDE; 63 virtual void SelectAll(bool reversed) OVERRIDE;
66 virtual void RevertAll() OVERRIDE; 64 virtual void RevertAll() OVERRIDE;
67 virtual void UpdatePopup() OVERRIDE; 65 virtual void UpdatePopup() OVERRIDE;
68 virtual void ClosePopup() OVERRIDE; 66 virtual void ClosePopup() OVERRIDE;
69 virtual void SetFocus() OVERRIDE; 67 virtual void SetFocus() OVERRIDE;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 NSString* GetNonSuggestTextSubstring() const; 157 NSString* GetNonSuggestTextSubstring() const;
160 158
161 // Returns the suggest portion of |field_|'s string value. 159 // Returns the suggest portion of |field_|'s string value.
162 NSString* GetSuggestTextSubstring() const; 160 NSString* GetSuggestTextSubstring() const;
163 161
164 // Pass the current content of |field_| to SetText(), maintaining 162 // Pass the current content of |field_| to SetText(), maintaining
165 // any selection. Named to be consistent with GTK and Windows, 163 // any selection. Named to be consistent with GTK and Windows,
166 // though here we cannot really do the in-place operation they do. 164 // though here we cannot really do the in-place operation they do.
167 void EmphasizeURLComponents(); 165 void EmphasizeURLComponents();
168 166
169 // Internally invoked whenever the text changes in some way.
170 void TextChanged();
171
172 // Calculates text attributes according to |display_text| and applies them 167 // Calculates text attributes according to |display_text| and applies them
173 // to the given |as| object. 168 // to the given |as| object.
174 void ApplyTextAttributes(const string16& display_text, 169 void ApplyTextAttributes(const string16& display_text,
175 NSMutableAttributedString* as); 170 NSMutableAttributedString* as);
176 171
177 // Return the number of UTF-16 units in the current buffer, excluding the 172 // Return the number of UTF-16 units in the current buffer, excluding the
178 // suggested text. 173 // suggested text.
179 NSUInteger GetTextLength() const; 174 NSUInteger GetTextLength() const;
180 175
181 // Places the caret at the given position. This clears any selection. 176 // Places the caret at the given position. This clears any selection.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // Was the delete key pressed with an empty selection at the end of the edit? 211 // Was the delete key pressed with an empty selection at the end of the edit?
217 bool delete_at_end_pressed_; 212 bool delete_at_end_pressed_;
218 213
219 // The maximum/standard line height for the displayed text. 214 // The maximum/standard line height for the displayed text.
220 CGFloat line_height_; 215 CGFloat line_height_;
221 216
222 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); 217 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac);
223 }; 218 };
224 219
225 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 220 #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