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

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: addressed nit 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..4de725fe0755917dbc64529cfe9ce8d40eb8950b 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "chrome/browser/ui/autofill/autofill_popup_controller.h"
+#include "chrome/browser/ui/autofill/autofill_popup_layout_model.h"
#include "chrome/browser/ui/autofill/autofill_popup_view_delegate.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_->layout_model().GetRowBounds(index);
+}
+
+int AutofillPopupViewBridge::GetIconResourceID(
+ const base::string16& resource_name) {
+ return controller_->layout_model().GetIconResourceID(resource_name);
+}
+
void AutofillPopupViewBridge::Hide() {
delete this;
}

Powered by Google App Engine
This is Rietveld 408576698