Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #import <Cocoa/Cocoa.h> | |
| 6 | |
| 7 #include "chrome/browser/ui/cocoa/autofill/password_generation_popup_view_bridge .h" | |
| 8 | |
| 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" | |
| 14 | |
| 15 namespace autofill { | |
| 16 | |
| 17 PasswordGenerationPopupViewBridge::PasswordGenerationPopupViewBridge( | |
| 18 PasswordGenerationPopupViewCocoa* view) : view_(view) { | |
| 19 } | |
| 20 | |
| 21 PasswordGenerationPopupViewBridge::~PasswordGenerationPopupViewBridge() { | |
| 22 } | |
| 23 | |
| 24 void PasswordGenerationPopupViewBridge::Hide() { | |
| 25 [view_ hidePopup]; | |
| 26 } | |
| 27 | |
| 28 void PasswordGenerationPopupViewBridge::Show() { | |
| 29 [view_ showPopup]; | |
| 30 } | |
| 31 | |
| 32 void PasswordGenerationPopupViewBridge::UpdateBoundsAndRedrawPopup() { | |
| 33 [view_ updateBoundsAndRedrawPopup]; | |
| 34 } | |
| 35 | |
| 36 void PasswordGenerationPopupViewBridge::PasswordSelectionUpdated() { | |
| 37 [view_ updateBoundsAndRedrawPopup]; | |
| 38 } | |
|
Ilya Sherman
2014/05/09 21:51:28
nit: Can this be combined with the method above it
Patrick Dubroy
2014/05/12 14:13:39
I don't think they should be combined. They are re
| |
| 39 | |
| 40 PasswordGenerationPopupView* PasswordGenerationPopupView::Create( | |
| 41 PasswordGenerationPopupController* controller) { | |
| 42 PasswordGenerationPopupViewCocoa* view = | |
| 43 [[[PasswordGenerationPopupViewCocoa alloc] | |
| 44 initWithController:controller | |
| 45 frame:NSZeroRect] autorelease]; | |
|
Ilya Sherman
2014/05/09 21:51:28
Same comment about memory management.
Patrick Dubroy
2014/05/12 14:13:39
Done.
| |
| 46 return new PasswordGenerationPopupViewBridge(view); | |
| 47 } | |
| 48 | |
| 49 } // namespace autofill | |
| OLD | NEW |