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

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

Issue 67136: Fix delete in Mac Omnibox. (Closed)
Patch Set: Created 11 years, 8 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 8a6147ed99a7136b372cd5f3d097e266656c7294..d6b09289f21e994c1390a3455f1b445eae909065 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
@@ -78,8 +78,8 @@ class AutocompleteEditViewMac : public AutocompleteEditView {
virtual bool OnInlineAutocompleteTextMaybeChanged(
const std::wstring& display_text, size_t user_text_length);
virtual void OnRevertTemporaryText();
- virtual void OnBeforePossibleChange() { NOTIMPLEMENTED(); }
- virtual bool OnAfterPossibleChange() { NOTIMPLEMENTED(); return false; }
+ virtual void OnBeforePossibleChange();
+ virtual bool OnAfterPossibleChange();
// Helper functions which forward to our private: model_.
void OnUpOrDownKeyPressed(int dir);
@@ -87,11 +87,6 @@ class AutocompleteEditViewMac : public AutocompleteEditView {
void OnSetFocus(bool f);
void OnKillFocus();
void AcceptInput(WindowOpenDisposition disposition, bool for_drop);
- void OnAfterPossibleChange(const std::wstring& new_text,
- bool selection_differs,
- bool text_differs,
- bool just_deleted_text,
- bool at_end_of_edit);
// TODO(shess): Get rid of this. Right now it's needed because of
// the ordering of initialization in tab_contents_controller.mm.
@@ -101,6 +96,10 @@ class AutocompleteEditViewMac : public AutocompleteEditView {
void FocusLocation();
private:
+ // Returns the field's currently selected range. Only valid if the
+ // field has focus.
+ NSRange GetSelectedRange() const;
+
scoped_ptr<AutocompleteEditModel> model_;
scoped_ptr<AutocompletePopupViewMac> popup_view_;
@@ -118,6 +117,11 @@ class AutocompleteEditViewMac : public AutocompleteEditView {
std::wstring saved_temporary_text_;
+ // Tracking state before and after a possible change for reporting
+ // to model_.
+ NSRange selection_before_change_;
+ std::wstring text_before_change_;
+
DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac);
};
« 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