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( |