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 PasswordGenerationPopupController* controller) { | |
| 19 view_.reset( | |
| 20 [[PasswordGenerationPopupViewCocoa alloc] | |
| 21 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.
| |
| 22 } | |
| 23 | |
| 24 PasswordGenerationPopupViewBridge::~PasswordGenerationPopupViewBridge() { | |
| 25 [view_ hidePopup]; | |
| 26 } | |
| 27 | |
| 28 void PasswordGenerationPopupViewBridge::Hide() { | |
| 29 delete this; | |
| 30 } | |
| 31 | |
| 32 void PasswordGenerationPopupViewBridge::Show() { | |
| 33 [view_ showPopup]; | |
| 34 } | |
| 35 | |
| 36 void PasswordGenerationPopupViewBridge::UpdateBoundsAndRedrawPopup() { | |
| 37 [view_ updateBoundsAndRedrawPopup]; | |
| 38 } | |
| 39 | |
| 40 void PasswordGenerationPopupViewBridge::PasswordSelectionUpdated() { | |
| 41 [view_ updateBoundsAndRedrawPopup]; | |
| 42 } | |
| 43 | |
| 44 PasswordGenerationPopupView* PasswordGenerationPopupView::Create( | |
| 45 PasswordGenerationPopupController* controller) { | |
| 46 return new PasswordGenerationPopupViewBridge(controller); | |
| 47 } | |
| 48 | |
| 49 } // namespace autofill | |
| OLD | NEW |