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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit_view_mac.h

Issue 114017: Use Chrome facilities for omnibox state save and restore on Mac. (Closed)
Patch Set: Wordsmithing. 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 25 matching lines...) Expand all
36 NSTextField* field); 36 NSTextField* field);
37 virtual ~AutocompleteEditViewMac(); 37 virtual ~AutocompleteEditViewMac();
38 38
39 // Implement the AutocompleteEditView interface. 39 // Implement the AutocompleteEditView interface.
40 // TODO(shess): See if this couldn't be simplified to: 40 // TODO(shess): See if this couldn't be simplified to:
41 // virtual AEM* model() const { ... } 41 // virtual AEM* model() const { ... }
42 virtual AutocompleteEditModel* model() { return model_.get(); } 42 virtual AutocompleteEditModel* model() { return model_.get(); }
43 virtual const AutocompleteEditModel* model() const { return model_.get(); } 43 virtual const AutocompleteEditModel* model() const { return model_.get(); }
44 44
45 virtual void SaveStateToTab(TabContents* tab); 45 virtual void SaveStateToTab(TabContents* tab);
46 virtual void Update(const TabContents* tab_for_state_restoring) { 46 virtual void Update(const TabContents* tab_for_state_restoring);
47 NOTIMPLEMENTED();
48 }
49 47
50 virtual void OpenURL(const GURL& url, 48 virtual void OpenURL(const GURL& url,
51 WindowOpenDisposition disposition, 49 WindowOpenDisposition disposition,
52 PageTransition::Type transition, 50 PageTransition::Type transition,
53 const GURL& alternate_nav_url, 51 const GURL& alternate_nav_url,
54 size_t selected_line, 52 size_t selected_line,
55 const std::wstring& keyword); 53 const std::wstring& keyword);
56 54
57 virtual std::wstring GetText() const; 55 virtual std::wstring GetText() const;
58 virtual void SetUserText(const std::wstring& text) { NOTIMPLEMENTED(); } 56 virtual void SetUserText(const std::wstring& text) {
57 SetUserText(text, text, true);
58 }
59 virtual void SetUserText(const std::wstring& text, 59 virtual void SetUserText(const std::wstring& text,
60 const std::wstring& display_text, 60 const std::wstring& display_text,
61 bool update_popup) { NOTIMPLEMENTED(); } 61 bool update_popup);
62 62
63 virtual void SetWindowTextAndCaretPos(const std::wstring& text, 63 virtual void SetWindowTextAndCaretPos(const std::wstring& text,
64 size_t caret_pos); 64 size_t caret_pos);
65 65
66 virtual bool IsSelectAll() { 66 virtual bool IsSelectAll() {
67 NOTIMPLEMENTED(); 67 NOTIMPLEMENTED();
68 return false; 68 return false;
69 } 69 }
70 70
71 virtual void SelectAll(bool reversed); 71 virtual void SelectAll(bool reversed);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 // Tracking state before and after a possible change for reporting 117 // Tracking state before and after a possible change for reporting
118 // to model_. 118 // to model_.
119 NSRange selection_before_change_; 119 NSRange selection_before_change_;
120 std::wstring text_before_change_; 120 std::wstring text_before_change_;
121 121
122 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); 122 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac);
123 }; 123 };
124 124
125 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ 125 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698