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

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: AutofillPopupViewHelper 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..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);

Powered by Google App Engine
This is Rietveld 408576698