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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_header.h

Issue 77283002: [rAc OSX] Factor out AutofillHeader class to contain dialog header elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile after rebase Created 7 years, 1 month 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/autofill_header.h
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.h b/chrome/browser/ui/cocoa/autofill/autofill_header.h
similarity index 50%
copy from chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.h
copy to chrome/browser/ui/cocoa/autofill/autofill_header.h
index e051c2cffd641f394ef51fafa15c463104f06fca..e9e6f6bcdbda8ae42d5481dd670a53f3328ea8b4 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.h
+++ b/chrome/browser/ui/cocoa/autofill/autofill_header.h
@@ -2,26 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
-#define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
+#ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_HEADER_H_
+#define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_HEADER_H_
#import <Cocoa/Cocoa.h>
#include "base/mac/scoped_nsobject.h"
-#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_layout.h"
namespace autofill {
class AutofillDialogViewDelegate;
-struct DialogOverlayState;
} // autofill
-@class AutofillMessageView;
+@class AutofillAccountChooser;
-@interface AutofillOverlayController : NSViewController<AutofillLayout> {
+@interface AutofillHeader : NSViewController<AutofillLayout> {
@private
- base::scoped_nsobject<NSImageView> imageView_;
- base::scoped_nsobject<AutofillMessageView> messageView_;
+ base::scoped_nsobject<AutofillAccountChooser> accountChooser_;
+ base::scoped_nsobject<NSTextField> title_;
+ // TODO(isherman): Include notifications in the header.
autofill::AutofillDialogViewDelegate* delegate_; // not owned, owns dialog.
}
@@ -29,12 +28,16 @@ struct DialogOverlayState;
// Designated initializer.
- (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate;
-// Updates the state from the dialog controller.
-- (void)updateState;
+// Returns the anchor view for notifications, which is the middle of the account
+// chooser view.
+- (NSView*)anchorView;
+
+// Updates the header's state from the dialog controller.
+- (void)update;
// Get the preferred view height for a given width.
- (CGFloat)heightForWidth:(int)width;
@end
-#endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
+#endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_HEADER_H_

Powered by Google App Engine
This is Rietveld 408576698