OLD | NEW |
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" |
11 #include "base/scoped_nsobject.h" | 11 #include "base/scoped_nsobject.h" |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "chrome/browser/autocomplete/autocomplete.h" | 13 #include "chrome/browser/autocomplete/autocomplete.h" |
14 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" | 14 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" |
15 #include "chrome/browser/toolbar_model.h" | 15 #include "chrome/browser/toolbar_model.h" |
16 #include "chrome/common/page_transition_types.h" | 16 #include "chrome/common/page_transition_types.h" |
17 #include "webkit/glue/window_open_disposition.h" | 17 #include "webkit/glue/window_open_disposition.h" |
18 | 18 |
19 class AutocompleteEditController; | 19 class AutocompleteEditController; |
20 @class AutocompleteEditHelper; | 20 @class AutocompleteEditHelper; |
21 class AutocompleteEditModel; | 21 class AutocompleteEditModel; |
22 class AutocompletePopupPositioner; | |
23 class AutocompletePopupViewMac; | 22 class AutocompletePopupViewMac; |
24 @class AutocompleteTextField; | 23 @class AutocompleteTextField; |
| 24 class BubblePositioner; |
25 class Clipboard; | 25 class Clipboard; |
26 class CommandUpdater; | 26 class CommandUpdater; |
27 class Profile; | 27 class Profile; |
28 class TabContents; | 28 class TabContents; |
29 class ToolbarModel; | 29 class ToolbarModel; |
30 | 30 |
31 // Implements AutocompleteEditView on an AutocompleteTextField. | 31 // Implements AutocompleteEditView on an AutocompleteTextField. |
32 | 32 |
33 class AutocompleteEditViewMac : public AutocompleteEditView { | 33 class AutocompleteEditViewMac : public AutocompleteEditView { |
34 public: | 34 public: |
35 AutocompleteEditViewMac(AutocompleteEditController* controller, | 35 AutocompleteEditViewMac(AutocompleteEditController* controller, |
36 AutocompletePopupPositioner* positioner, | 36 const BubblePositioner* bubble_positioner, |
37 ToolbarModel* toolbar_model, | 37 ToolbarModel* toolbar_model, |
38 Profile* profile, | 38 Profile* profile, |
39 CommandUpdater* command_updater, | 39 CommandUpdater* command_updater, |
40 AutocompleteTextField* field); | 40 AutocompleteTextField* field); |
41 virtual ~AutocompleteEditViewMac(); | 41 virtual ~AutocompleteEditViewMac(); |
42 | 42 |
43 // Implement the AutocompleteEditView interface. | 43 // Implement the AutocompleteEditView interface. |
44 // TODO(shess): See if this couldn't be simplified to: | 44 // TODO(shess): See if this couldn't be simplified to: |
45 // virtual AEM* model() const { ... } | 45 // virtual AEM* model() const { ... } |
46 virtual AutocompleteEditModel* model() { return model_.get(); } | 46 virtual AutocompleteEditModel* model() { return model_.get(); } |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 // Tracking state before and after a possible change for reporting | 185 // Tracking state before and after a possible change for reporting |
186 // to model_. | 186 // to model_. |
187 NSRange selection_before_change_; | 187 NSRange selection_before_change_; |
188 std::wstring text_before_change_; | 188 std::wstring text_before_change_; |
189 | 189 |
190 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); | 190 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); |
191 }; | 191 }; |
192 | 192 |
193 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ | 193 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ |
OLD | NEW |