Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b9170302d3867dda2657444791264cbb430893f5 |
| --- /dev/null |
| +++ b/chrome/browser/ui/cocoa/autofill/password_generation_popup_view_bridge.mm |
| @@ -0,0 +1,49 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#import <Cocoa/Cocoa.h> |
| + |
| +#include "chrome/browser/ui/cocoa/autofill/password_generation_popup_view_bridge.h" |
| + |
| +#include "base/logging.h" |
| +#include "chrome/browser/ui/autofill/autofill_popup_controller.h" |
| +#import "chrome/browser/ui/cocoa/autofill/password_generation_popup_view_cocoa.h" |
| +#include "ui/base/cocoa/window_size_constants.h" |
| +#include "ui/gfx/rect.h" |
| + |
| +namespace autofill { |
| + |
| +PasswordGenerationPopupViewBridge::PasswordGenerationPopupViewBridge( |
| + PasswordGenerationPopupController* controller) { |
| + view_.reset( |
| + [[PasswordGenerationPopupViewCocoa alloc] |
| + initWithController:controller frame:NSZeroRect]); |
|
Ilya Sherman
2014/05/12 21:46:10
nit: Please write this as one arg per line.
Patrick Dubroy
2014/05/13 12:18:05
Done.
|
| +} |
| + |
| +PasswordGenerationPopupViewBridge::~PasswordGenerationPopupViewBridge() { |
| + [view_ hidePopup]; |
| +} |
| + |
| +void PasswordGenerationPopupViewBridge::Hide() { |
| + delete this; |
| +} |
| + |
| +void PasswordGenerationPopupViewBridge::Show() { |
| + [view_ showPopup]; |
| +} |
| + |
| +void PasswordGenerationPopupViewBridge::UpdateBoundsAndRedrawPopup() { |
| + [view_ updateBoundsAndRedrawPopup]; |
| +} |
| + |
| +void PasswordGenerationPopupViewBridge::PasswordSelectionUpdated() { |
| + [view_ updateBoundsAndRedrawPopup]; |
| +} |
| + |
| +PasswordGenerationPopupView* PasswordGenerationPopupView::Create( |
| + PasswordGenerationPopupController* controller) { |
| + return new PasswordGenerationPopupViewBridge(controller); |
| +} |
| + |
| +} // namespace autofill |