Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm

Issue 1570783003: [Autofill] Move functions from the AutofillPopupController to AutofillPopupLayoutModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: controller now owns the helper Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d5829305b0acad1106a3f24ea4fff29af1913723 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm
@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "chrome/browser/ui/autofill/autofill_popup_controller.h"
#include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h"
+#include "chrome/browser/ui/autofill/autofill_popup_view_helper.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h"
#include "ui/gfx/geometry/rect.h"
@@ -17,9 +18,9 @@ namespace autofill {
AutofillPopupViewBridge::AutofillPopupViewBridge(
AutofillPopupController* controller)
: controller_(controller) {
- view_.reset(
- [[AutofillPopupViewCocoa alloc] initWithController:controller
- frame:NSZeroRect]);
+ 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 controller_->view_helper()->GetRowBounds(index);
+}
+
+int AutofillPopupViewBridge::GetIconResourceID(
+ const base::string16& resource_name) {
+ return controller_->view_helper()->GetIconResourceID(resource_name);
+}
+
void AutofillPopupViewBridge::Hide() {
delete this;
}

Powered by Google App Engine
This is Rietveld 408576698