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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_mac.h

Issue 113479: Mac: Style the omnibox URL. (Closed)
Patch Set: Fix a couple comments, and saving across popup navigation. Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit_view_mac.h
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
index a69384100b00ae44ce473429085cddb246a4ad12..ff394de15fec81cca40360c6bcd45a508c161cc8 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
@@ -72,8 +72,6 @@ class AutocompleteEditViewMac : public AutocompleteEditView {
virtual void RevertAll();
virtual void UpdatePopup();
virtual void ClosePopup();
- void UpdateAndStyleText(const std::wstring& display_text,
- size_t user_text_length);
virtual void OnTemporaryTextMaybeChanged(const std::wstring& display_text,
bool save_original_selection);
virtual bool OnInlineAutocompleteTextMaybeChanged(
@@ -97,6 +95,13 @@ class AutocompleteEditViewMac : public AutocompleteEditView {
// field has focus.
NSRange GetSelectedRange() const;
+ // Grab focus if needed and set the selection to |range|.
+ void SetSelectedRange(const NSRange range);
+
+ // Update the field with |display_text| and highlight the host and
+ // scheme (if it's an URL or URL-fragment).
+ void UpdateAndStyleText(const std::wstring& display_text);
+
scoped_ptr<AutocompleteEditModel> model_;
scoped_ptr<AutocompletePopupViewMac> popup_view_;
@@ -112,6 +117,9 @@ class AutocompleteEditViewMac : public AutocompleteEditView {
// Objective-C object to bridge field_ delegate calls to C++.
scoped_nsobject<AutocompleteEditHelper> edit_helper_;
+ // Text and selection at the point where the user started using the
+ // arrows to move around in the popup.
+ NSRange saved_temporary_selection_;
std::wstring saved_temporary_text_;
// Tracking state before and after a possible change for reporting
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698