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 "chrome/browser/ui/autofill/autofill_popup_view.h"
14 @
class AutofillPopupViewCocoa
;
19 class AutofillPopupController
;
21 // Mac implementation for AutofillPopupView interface.
22 // Serves as a bridge to the Objective-C class AutofillPopupViewCocoa which
23 // actually implements the view.
24 class AutofillPopupViewBridge
: public AutofillPopupView
{
26 explicit AutofillPopupViewBridge(AutofillPopupController
* controller
);
29 virtual ~AutofillPopupViewBridge();
31 // AutofillPopupView implementation.
32 virtual void Hide() OVERRIDE
;
33 virtual void Show() OVERRIDE
;
34 virtual void InvalidateRow(size_t row
) OVERRIDE
;
35 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE
;
37 // Set the initial bounds of the popup to show, including the placement
39 void SetInitialBounds();
41 // The controller for this view.
42 AutofillPopupController
* controller_
; // Weak reference.
44 // The native Cocoa window and view.
45 NSWindow
* window_
; // Weak reference, owns itself.
46 AutofillPopupViewCocoa
* view_
; // Weak reference, owned by the |window_|.
48 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewBridge
);
51 } // namespace autofill
53 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_