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

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

Issue 23674004: [rAC, OSX] Add overlay shield for interstitials/waits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/autofill_overlay_controller.h
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.h b/chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..c521642d17f2c5a2843fd09d5a3ace01d8549c20
--- /dev/null
+++ b/chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.h
@@ -0,0 +1,58 @@
+// Copyright 2013 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.
+
+#ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
+#define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_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 {
+ struct DialogOverlayState;
sail 2013/09/04 20:04:06 Don't need to indent or add a "// namespace ..." c
groby-ooo-7-16 2013/09/04 20:41:45 Done.
+} // namespace autofill
+
+namespace ui {
+ class Animation;
+ class MultiAnimation;
+} // namespace ui
+
+class AnimationDelegateBridge;
+@class AutofillMessageStackView;
+
+// Protocol that allows Cocoa objects to act as a delegate for a ui::Animation.
+@protocol ChromiumAnimationDelegate
sail 2013/09/04 20:04:06 How about just AnimationDelegate or AnimationDeleg
groby-ooo-7-16 2013/09/04 20:41:45 I'm fine with that - I just hope it doesn't clash
+- (void)animationProgressed:(const ui::Animation*)animation;
+- (void)animationEnded:(const ui::Animation*)animation;
+@end
+
+
+@interface AutofillOverlayController :
+ NSViewController<ChromiumAnimationDelegate, AutofillLayout> {
+ @private
+ base::scoped_nsobject<NSBox> view_; // The main view.
sail 2013/09/04 20:04:06 Instead of keeping a separate reference to this, h
groby-ooo-7-16 2013/09/04 20:41:45 Done.
+ base::scoped_nsobject<NSView> childView_; // Contains all UI elements.
+ base::scoped_nsobject<NSImageView> imageView_;
+ base::scoped_nsobject<AutofillMessageStackView> messageStackView_;
+
+ scoped_ptr<ui::MultiAnimation> fadeOutAnimation_; // Animation rules.
+ scoped_ptr<AnimationDelegateBridge> animationDelegate_;
+}
+
+
+// Set the current dialog state.
+- (void)setState:(const autofill::DialogOverlayState&)state;
+
+// Start the animation sequence. At its end, the dialog will hide itself.
+- (void)beginFadeOut;
+
+// Get the preferred view height for a given width.
+- (int)getHeightForWidth:(int)width;
sail 2013/09/04 20:04:06 how about heightForWidth:?
groby-ooo-7-16 2013/09/04 20:41:45 Done.
+
+@end
+
+#endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
+

Powered by Google App Engine
This is Rietveld 408576698