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

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: Review fixes, next round. 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..63101dcda44b0f1fdbce9a57138e0ebfcee1cc7c
--- /dev/null
+++ b/chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.h
@@ -0,0 +1,73 @@
+// 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 {
+class AutofillDialogViewDelegate;
+struct DialogOverlayState;
+} // autofill
+
+namespace ui {
+class Animation;
+class MultiAnimation;
+} // ui
+
+class AnimationDelegateBridge;
+class OverlayTimerBridge;
+
+@class AutofillMessageStackView;
+
+// Protocol that allows Cocoa objects to act as a delegate for a ui::Animation.
+@protocol AnimationDelegate
+- (void)animationProgressed:(const ui::Animation*)animation;
+- (void)animationEnded:(const ui::Animation*)animation;
+@end
+
+
+@interface AutofillOverlayController :
+ NSViewController<AnimationDelegate, AutofillLayout> {
+ @private
+ // |childView_| contains all overlay UI elements. This is used to fade out
+ // UI elements first, before making the main view transparent to fade out the
+ // overlay shield.
+ base::scoped_nsobject<NSView> childView_;
+ base::scoped_nsobject<NSImageView> imageView_;
+ base::scoped_nsobject<AutofillMessageStackView> messageStackView_;
+
+ scoped_ptr<ui::MultiAnimation> fadeOutAnimation_; // Animation rules.
+ scoped_ptr<AnimationDelegateBridge> animationDelegate_;
+
+ // Timer to control refresh rate of the overlay's state.
+ scoped_ptr<OverlayTimerBridge> refreshTimer_;
+
+ autofill::AutofillDialogViewDelegate* delegate_; // not owned, owns dialog.
+}
+
+// Designated initializer.
+- (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate;
+
+// Updates the state from the dialog controller.
+- (void)updateState;
+
+// Sets a specific state for the overlay.
+- (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)heightForWidth:(int)width;
+
+@end
+
+#endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
+

Powered by Google App Engine
This is Rietveld 408576698