OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ |
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ | 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/mac/scoped_nsobject.h" | 13 #include "base/mac/scoped_nsobject.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "chrome/browser/ui/autofill/autofill_popup_view.h" | 15 #include "chrome/browser/ui/autofill/autofill_popup_view.h" |
16 #include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h" | 16 #include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h" |
17 | 17 |
18 @class AutofillPopupViewCocoa; | 18 @class AutofillPopupViewCocoa; |
19 @class NSWindow; | 19 @class NSWindow; |
20 | 20 |
21 namespace autofill { | 21 namespace autofill { |
22 | 22 |
23 class AutofillPopupViewDelegate; | |
24 | |
25 class AutofillPopupViewCocoaDelegate { | 23 class AutofillPopupViewCocoaDelegate { |
26 public: | 24 public: |
27 // Returns the bounds of the item at |index| in the popup, relative to | 25 // Returns the bounds of the item at |index| in the popup, relative to |
28 // the top left of the popup. | 26 // the top left of the popup. |
29 virtual gfx::Rect GetRowBounds(size_t index) = 0; | 27 virtual gfx::Rect GetRowBounds(size_t index) = 0; |
30 | 28 |
31 // Gets the resource value for the given resource, returning -1 if the | 29 // Gets the resource value for the given resource, returning -1 if the |
32 // resource isn't recognized. | 30 // resource isn't recognized. |
33 virtual int GetIconResourceID(const base::string16& resource_name) = 0; | 31 virtual int GetIconResourceID(const base::string16& resource_name) = 0; |
34 }; | 32 }; |
(...skipping 26 matching lines...) Expand all Loading... |
61 base::scoped_nsobject<AutofillPopupViewCocoa> view_; | 59 base::scoped_nsobject<AutofillPopupViewCocoa> view_; |
62 | 60 |
63 AutofillPopupController* controller_; // Weak. | 61 AutofillPopupController* controller_; // Weak. |
64 | 62 |
65 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewBridge); | 63 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewBridge); |
66 }; | 64 }; |
67 | 65 |
68 } // namespace autofill | 66 } // namespace autofill |
69 | 67 |
70 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ | 68 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ |
OLD | NEW |