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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h

Issue 267183002: Password manager: Implement password generation UI for Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove some dead code, add TODO. 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/ui/autofill/autofill_popup_view.h" 12 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
13 #include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h"
13 14
14 @class AutofillPopupViewCocoa; 15 @class AutofillPopupViewCocoa;
15 @class NSWindow; 16 @class NSWindow;
16 17
17 namespace autofill { 18 namespace autofill {
18 19
19 class AutofillPopupController; 20 class AutofillPopupViewDelegate;
20 21
21 // Mac implementation for AutofillPopupView interface. 22 // Mac implementation of the AutofillPopupView interface.
22 // Serves as a bridge to the Objective-C class AutofillPopupViewCocoa which 23 // Serves as a bridge to an instance of the Objective-C class which actually
23 // actually implements the view. 24 // implements the view.
24 class AutofillPopupViewBridge : public AutofillPopupView { 25 class AutofillPopupViewBridge : public AutofillPopupView {
25 public: 26 public:
26 explicit AutofillPopupViewBridge(AutofillPopupController* controller); 27 explicit AutofillPopupViewBridge(
28 AutofillPopupViewCocoa* view, AutofillPopupController* controller);
Ilya Sherman 2014/05/09 21:51:28 nit: No longer needs to be explicit.
Ilya Sherman 2014/05/09 21:51:28 nit: Please add docs.
Ilya Sherman 2014/05/09 21:51:28 nit: One param per line.
Patrick Dubroy 2014/05/12 14:13:39 Done.
Patrick Dubroy 2014/05/12 14:13:39 I can't think of any useful documentation to add h
Patrick Dubroy 2014/05/12 14:13:39 Done.
27 29
28 private: 30 private:
29 virtual ~AutofillPopupViewBridge(); 31 virtual ~AutofillPopupViewBridge();
30 32
31 // AutofillPopupView implementation. 33 // AutofillPopupView implementation.
32 virtual void Hide() OVERRIDE; 34 virtual void Hide() OVERRIDE;
33 virtual void Show() OVERRIDE; 35 virtual void Show() OVERRIDE;
34 virtual void InvalidateRow(size_t row) OVERRIDE; 36 virtual void InvalidateRow(size_t row) OVERRIDE;
35 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE; 37 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE;
36 38
37 // Set the initial bounds of the popup to show, including the placement 39 // Set the initial bounds of the popup, including its placement.
38 // of it.
39 void SetInitialBounds(); 40 void SetInitialBounds();
40 41
41 // The controller for this view. 42 // The native Cocoa view.
43 AutofillPopupViewCocoa* view_; // Weak reference, owned by |window_|.
Ilya Sherman 2014/05/09 21:51:28 |window_| no longer refers to any member of this c
Ilya Sherman 2014/05/09 21:51:28 Is the |view_| guaranteed to outlive the bridge?
Patrick Dubroy 2014/05/12 14:13:39 Done.
Patrick Dubroy 2014/05/12 14:13:39 Fixed.
44
42 AutofillPopupController* controller_; // Weak reference. 45 AutofillPopupController* controller_; // Weak reference.
43 46
44 // The native Cocoa window and view.
45 NSWindow* window_; // Weak reference, owns itself.
46 AutofillPopupViewCocoa* view_; // Weak reference, owned by the |window_|.
47
48 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewBridge); 47 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewBridge);
49 }; 48 };
50 49
51 } // namespace autofill 50 } // namespace autofill
52 51
53 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_ 52 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698