| Index: chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm
|
| diff --git a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm
|
| index ce87e6b7cd799aaa6bd1bb33ed0cad5f2dca85df..e438b595b5955b54facc07f5b732b57a26f3be7d 100644
|
| --- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm
|
| +++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm
|
| @@ -16,10 +16,11 @@ namespace autofill {
|
|
|
| AutofillPopupViewBridge::AutofillPopupViewBridge(
|
| AutofillPopupController* controller)
|
| - : controller_(controller) {
|
| - view_.reset(
|
| - [[AutofillPopupViewCocoa alloc] initWithController:controller
|
| - frame:NSZeroRect]);
|
| + : view_helper_(new AutofillPopupViewHelper(controller)),
|
| + controller_(controller) {
|
| + view_.reset([[AutofillPopupViewCocoa alloc] initWithController:controller
|
| + frame:NSZeroRect
|
| + delegate:this]);
|
| }
|
|
|
| AutofillPopupViewBridge::~AutofillPopupViewBridge() {
|
| @@ -27,6 +28,15 @@ AutofillPopupViewBridge::~AutofillPopupViewBridge() {
|
| [view_ hidePopup];
|
| }
|
|
|
| +gfx::Rect AutofillPopupViewBridge::GetRowBounds(size_t index) {
|
| + return view_helper_->GetRowBounds(index);
|
| +}
|
| +
|
| +int AutofillPopupViewBridge::GetIconResourceID(
|
| + const base::string16& resource_name) {
|
| + return view_helper_->GetIconResourceID(resource_name);
|
| +}
|
| +
|
| void AutofillPopupViewBridge::Hide() {
|
| delete this;
|
| }
|
| @@ -43,6 +53,22 @@ void AutofillPopupViewBridge::UpdateBoundsAndRedrawPopup() {
|
| [view_ updateBoundsAndRedrawPopup];
|
| }
|
|
|
| +void AutofillPopupViewBridge::UpdatePopupBounds() {
|
| + view_helper_->UpdatePopupBounds();
|
| +}
|
| +
|
| +int AutofillPopupViewBridge::GetAvailableWidthForRow(int row, bool with_label) {
|
| + return view_helper_->GetAvailableWidthForRow(row, with_label);
|
| +}
|
| +
|
| +int AutofillPopupViewBridge::LineFromY(int y) {
|
| + return view_helper_->LineFromY(y);
|
| +}
|
| +
|
| +gfx::Rect AutofillPopupViewBridge::GetPopupBounds() {
|
| + return view_helper_->popup_bounds();
|
| +}
|
| +
|
| AutofillPopupView* AutofillPopupView::Create(
|
| AutofillPopupController* controller) {
|
| return new AutofillPopupViewBridge(controller);
|
|
|