| 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 17 matching lines...) Expand all Loading... |
| 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 InvalidateRow(size_t row) override; |
| 53 void UpdateBoundsAndRedrawPopup() override; | 54 void UpdateBoundsAndRedrawPopup() override; |
| 55 void NotifyAccessibilityEventForRow(ui::AXEvent event_type, |
| 56 size_t row) override {} |
| 54 | 57 |
| 55 // Set the initial bounds of the popup, including its placement. | 58 // Set the initial bounds of the popup, including its placement. |
| 56 void SetInitialBounds(); | 59 void SetInitialBounds(); |
| 57 | 60 |
| 58 // The native Cocoa view. | 61 // The native Cocoa view. |
| 59 base::scoped_nsobject<AutofillPopupViewCocoa> view_; | 62 base::scoped_nsobject<AutofillPopupViewCocoa> view_; |
| 60 | 63 |
| 61 AutofillPopupController* controller_; // Weak. | 64 AutofillPopupController* controller_; // Weak. |
| 62 | 65 |
| 63 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewBridge); | 66 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewBridge); |
| 64 }; | 67 }; |
| 65 | 68 |
| 66 } // namespace autofill | 69 } // namespace autofill |
| 67 | 70 |
| 68 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ | 71 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ |
| OLD | NEW |