Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1490)

Unified Diff: chrome/browser/ui/cocoa/autofill/password_generation_popup_view_bridge.mm

Issue 267183002: Password manager: Implement password generation UI for Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address isherman's comments. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698