1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #import <Cocoa/Cocoa.h>
7 #include "chrome/browser/ui/cocoa/autofill/password_generation_popup_view_bridge.h"
9 #include "base/logging.h"
10 #include "chrome/browser/ui/autofill/autofill_popup_controller.h"
11 #import "chrome/browser/ui/cocoa/autofill/password_generation_popup_view_cocoa.h"
12 #include "ui/base/cocoa/window_size_constants.h"
13 #include "ui/gfx/rect.h"
17 PasswordGenerationPopupViewBridge::PasswordGenerationPopupViewBridge(
18 PasswordGenerationPopupController* controller) {
20 [[PasswordGenerationPopupViewCocoa alloc]
21 initWithController:controller
25 PasswordGenerationPopupViewBridge::~PasswordGenerationPopupViewBridge() {
26 [view_ controllerDestroyed];
30 void PasswordGenerationPopupViewBridge::Hide() {
34 void PasswordGenerationPopupViewBridge::Show() {
38 gfx::Size PasswordGenerationPopupViewBridge::GetPreferredSizeOfPasswordView() {
39 // TODO(gcasto): Implement this function.
43 void PasswordGenerationPopupViewBridge::UpdateBoundsAndRedrawPopup() {
44 [view_ updateBoundsAndRedrawPopup];
47 void PasswordGenerationPopupViewBridge::PasswordSelectionUpdated() {
48 [view_ setNeedsDisplay:YES];
51 bool PasswordGenerationPopupViewBridge::IsPointInPasswordBounds(
52 const gfx::Point& point) {
53 // TODO(gcasto): Implement this function.
57 PasswordGenerationPopupView* PasswordGenerationPopupView::Create(
58 PasswordGenerationPopupController* controller) {
59 return new PasswordGenerationPopupViewBridge(controller);
62 } // namespace autofill