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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/password_generation_popup_view_cocoa.mm

Issue 267183002: Password manager: Implement password generation UI for Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 "chrome/browser/ui/cocoa/autofill/password_generation_popup_view_cocoa.h "
6
7 #include "base/logging.h"
8 #include "base/strings/sys_string_conversions.h"
9 #include "chrome/browser/ui/autofill/autofill_popup_controller.h"
10 #include "chrome/browser/ui/autofill/popup_constants.h"
11 #include "chrome/browser/ui/cocoa/autofill/password_generation_popup_view_bridge .h"
12 #include "components/autofill/core/browser/popup_item_ids.h"
13 #include "grit/ui_resources.h"
14 #include "ui/base/resource/resource_bundle.h"
15 #include "ui/gfx/font_list.h"
16 #include "ui/gfx/image/image.h"
17 #include "ui/gfx/point.h"
18 #include "ui/gfx/rect.h"
19
20 using autofill::PasswordGenerationPopupView;
21
22 @interface PasswordGenerationPopupViewCocoa ()
23 @end
24
25 @implementation PasswordGenerationPopupViewCocoa
26
27 #pragma mark -
28 #pragma mark Initialisers
29
30 - (id)initWithFrame:(NSRect)frame {
31 NOTREACHED();
32 return [self initWithController:NULL frame:frame];
33 }
34
35 - (id)initWithController:(autofill::PasswordGenerationPopupController*)controlle r
36 frame:(NSRect)frame {
37 self = [super initWithAutofillPopupViewDelegate:controller frame:frame];
38 if (self)
39 controller_ = controller;
40
41 return self;
42 }
43
44 - (void)controllerDestroyed {
45 // Since the |controller_| either already has been destroyed or is about to
46 // be, about the only thing we can safely do with it is to null it out.
47 controller_ = NULL;
48 }
49
50 #pragma mark -
51 #pragma mark NSView implementation:
52
53 - (void)drawRect:(NSRect)dirtyRect {
54 // If the view is in the process of being destroyed, don't bother drawing.
55 if (!controller_)
56 return;
57
58 [self drawBackgroundAndBorderInRect:dirtyRect];
59
60 // FIXME: Draw more than just the background and border :-)
61 }
62
63 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698