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

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

Issue 487193003: Update Mac password generation autofill popup to match latest mocks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/password_generation_popup_view_bridge.mm
diff --git a/chrome/browser/ui/cocoa/autofill/password_generation_popup_view_bridge.mm b/chrome/browser/ui/cocoa/autofill/password_generation_popup_view_bridge.mm
index 6c22cb8bb63cad3504e9ea8fe2c4f0915c237b54..827c22361c99f56e8b3f80e698f2588672aa8930 100644
--- a/chrome/browser/ui/cocoa/autofill/password_generation_popup_view_bridge.mm
+++ b/chrome/browser/ui/cocoa/autofill/password_generation_popup_view_bridge.mm
@@ -8,14 +8,18 @@
#include "base/logging.h"
#include "chrome/browser/ui/autofill/autofill_popup_controller.h"
+#include "chrome/browser/ui/autofill/password_generation_popup_controller.h"
+#include "chrome/browser/ui/autofill/popup_constants.h"
#import "chrome/browser/ui/cocoa/autofill/password_generation_popup_view_cocoa.h"
#include "ui/base/cocoa/window_size_constants.h"
groby-ooo-7-16 2014/08/19 23:32:17 Do you need window_size_constants?
dconnelly 2014/08/20 17:07:05 Done.
#include "ui/gfx/rect.h"
groby-ooo-7-16 2014/08/19 23:32:17 Do you need gfx/rect.h?
dconnelly 2014/08/20 17:07:05 Done.
+#include "ui/gfx/size.h"
namespace autofill {
PasswordGenerationPopupViewBridge::PasswordGenerationPopupViewBridge(
- PasswordGenerationPopupController* controller) {
+ PasswordGenerationPopupController* controller)
+ : controller_(controller) {
view_.reset(
[[PasswordGenerationPopupViewCocoa alloc]
initWithController:controller
@@ -36,8 +40,7 @@ void PasswordGenerationPopupViewBridge::Show() {
}
gfx::Size PasswordGenerationPopupViewBridge::GetPreferredSizeOfPasswordView() {
- // TODO(gcasto): Implement this function.
- return gfx::Size();
+ return gfx::Size(NSSizeToCGSize([view_ preferredSize]));
}
void PasswordGenerationPopupViewBridge::UpdateBoundsAndRedrawPopup() {
@@ -50,8 +53,7 @@ void PasswordGenerationPopupViewBridge::PasswordSelectionUpdated() {
bool PasswordGenerationPopupViewBridge::IsPointInPasswordBounds(
const gfx::Point& point) {
- // TODO(gcasto): Implement this function.
- return true;
+ return [view_ isPointInPasswordBounds:point.ToCGPoint()];
}
PasswordGenerationPopupView* PasswordGenerationPopupView::Create(

Powered by Google App Engine
This is Rietveld 408576698