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.
5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "base/mac/scoped_nsobject.h"
13 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
14 #include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h"
16 @
class AutofillPopupViewCocoa
;
21 class AutofillPopupViewDelegate
;
23 // Mac implementation of the AutofillPopupView interface.
24 // Serves as a bridge to an instance of the Objective-C class which actually
25 // implements the view.
26 class AutofillPopupViewBridge
: public AutofillPopupView
{
28 explicit AutofillPopupViewBridge(AutofillPopupController
* controller
);
31 ~AutofillPopupViewBridge() override
;
33 // AutofillPopupView implementation.
36 void InvalidateRow(size_t row
) override
;
37 void UpdateBoundsAndRedrawPopup() override
;
39 // Set the initial bounds of the popup, including its placement.
40 void SetInitialBounds();
42 // The native Cocoa view.
43 base::scoped_nsobject
<AutofillPopupViewCocoa
> view_
;
45 AutofillPopupController
* controller_
; // Weak.
47 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewBridge
);
50 } // namespace autofill
52 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_