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 #include "ui/accessibility/ax_enums.h" | |
17 | 18 |
18 @class AutofillPopupViewCocoa; | 19 @class AutofillPopupViewCocoa; |
19 @class NSWindow; | 20 @class NSWindow; |
20 | 21 |
21 namespace autofill { | 22 namespace autofill { |
22 | 23 |
23 class AutofillPopupViewCocoaDelegate { | 24 class AutofillPopupViewCocoaDelegate { |
24 public: | 25 public: |
25 // Returns the bounds of the item at |index| in the popup, relative to | 26 // Returns the bounds of the item at |index| in the popup, relative to |
26 // the top left of the popup. | 27 // the top left of the popup. |
(...skipping 15 matching lines...) Expand all Loading... | |
42 // AutofillPopupViewCocoaDelegate implementation. | 43 // AutofillPopupViewCocoaDelegate implementation. |
43 gfx::Rect GetRowBounds(size_t index) override; | 44 gfx::Rect GetRowBounds(size_t index) override; |
44 int GetIconResourceID(const base::string16& resource_name) override; | 45 int GetIconResourceID(const base::string16& resource_name) override; |
45 | 46 |
46 private: | 47 private: |
47 ~AutofillPopupViewBridge() override; | 48 ~AutofillPopupViewBridge() override; |
48 | 49 |
49 // AutofillPopupView implementation. | 50 // AutofillPopupView implementation. |
50 void Hide() override; | 51 void Hide() override; |
51 void Show() override; | 52 void Show() override; |
52 void InvalidateRow(size_t row) override; | 53 void OnSelectedRowChanged(int previous_row_selection, |
groby-ooo-7-16
2017/03/20 20:42:55
Why change away from InvalidateRow() - which doesn
Evan Stade
2017/03/20 21:36:57
I asked for this change. The optional change is to
csashi
2017/03/20 21:41:51
FWIW, this was a result of a previous review. I ag
groby-ooo-7-16
2017/03/20 22:53:10
Thanks for the explanation - I wasn't aware of the
| |
53 void UpdateBoundsAndRedrawPopup() override; | 54 int current_row_selection) override; |
55 void OnSuggestionsChanged() override; | |
54 | 56 |
55 // Set the initial bounds of the popup, including its placement. | 57 // Set the initial bounds of the popup, including its placement. |
56 void SetInitialBounds(); | 58 void SetInitialBounds(); |
57 | 59 |
58 // The native Cocoa view. | 60 // The native Cocoa view. |
59 base::scoped_nsobject<AutofillPopupViewCocoa> view_; | 61 base::scoped_nsobject<AutofillPopupViewCocoa> view_; |
60 | 62 |
61 AutofillPopupController* controller_; // Weak. | 63 AutofillPopupController* controller_; // Weak. |
62 | 64 |
63 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewBridge); | 65 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewBridge); |
64 }; | 66 }; |
65 | 67 |
66 } // namespace autofill | 68 } // namespace autofill |
67 | 69 |
68 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ | 70 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ |
OLD | NEW |