| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_nsobject.h" |
| 12 #include "chrome/browser/ui/autofill/autofill_popup_view.h" |
| 13 |
| 14 class AutofillPopupController; |
| 15 @class AutofillPopupViewCocoa; |
| 16 @class NSWindow; |
| 17 |
| 18 // Mac implementation for AutofillPopupView interface. |
| 19 // Serves as a bridge to the Objective-C class AutofillPopupViewCocoa which |
| 20 // actually implements the view. |
| 21 class AutofillPopupViewBridge : public AutofillPopupView { |
| 22 public: |
| 23 explicit AutofillPopupViewBridge(AutofillPopupController* controller); |
| 24 |
| 25 private: |
| 26 virtual ~AutofillPopupViewBridge(); |
| 27 |
| 28 // AutofillPopupView implementation. |
| 29 virtual void Hide() OVERRIDE; |
| 30 virtual void Show() OVERRIDE; |
| 31 virtual void InvalidateRow(size_t row) OVERRIDE; |
| 32 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE; |
| 33 |
| 34 // Set the initial bounds of the popup to show, including the placement |
| 35 // of it. |
| 36 void SetInitialBounds(); |
| 37 |
| 38 // The controller for this view. |
| 39 AutofillPopupController* controller_; // Weak reference. |
| 40 |
| 41 // The native Cocoa window and view. |
| 42 NSWindow* window_; // Weak reference, owns itself. |
| 43 AutofillPopupViewCocoa* view_; // Weak reference, owned by the |window_|. |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewBridge); |
| 46 }; |
| 47 |
| 48 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ |
| OLD | NEW |