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 #import <Cocoa/Cocoa.h>
7 #include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h"
9 #include "base/logging.h"
10 #include "chrome/browser/ui/autofill/autofill_popup_controller.h"
11 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h"
12 #import "chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h"
13 #include "ui/gfx/geometry/rect.h"
17 AutofillPopupViewBridge::AutofillPopupViewBridge(
18 AutofillPopupController* controller)
19 : controller_(controller) {
21 [[AutofillPopupViewCocoa alloc] initWithController:controller
25 AutofillPopupViewBridge::~AutofillPopupViewBridge() {
26 [view_ controllerDestroyed];
30 void AutofillPopupViewBridge::Hide() {
34 void AutofillPopupViewBridge::Show() {
38 void AutofillPopupViewBridge::InvalidateRow(size_t row) {
39 [view_ invalidateRow:row];
42 void AutofillPopupViewBridge::UpdateBoundsAndRedrawPopup() {
43 [view_ updateBoundsAndRedrawPopup];
46 AutofillPopupView* AutofillPopupView::Create(
47 AutofillPopupController* controller) {
48 return new AutofillPopupViewBridge(controller);
51 } // namespace autofill