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

Side by Side 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: Final tweaks. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h"
12 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h"
13
14 namespace autofill {
15 class AutofillDialogViewDelegate;
16 struct DialogOverlayState;
17 } // autofill
18
19 namespace ui {
20 class Animation;
21 class MultiAnimation;
22 } // ui
23
24 class AnimationDelegateBridge;
25 class OverlayTimerBridge;
26
27 @class AutofillMessageStackView;
28
29 // Protocol that allows Cocoa objects to act as a delegate for a ui::Animation.
30 @protocol AnimationDelegate
31 - (void)animationProgressed:(const ui::Animation*)animation;
32 - (void)animationEnded:(const ui::Animation*)animation;
33 @end
34
35
36 @interface AutofillOverlayController :
37 NSViewController<AnimationDelegate, AutofillLayout> {
38 @private
39 // |childView_| contains all overlay UI elements. This is used to fade out
40 // UI elements first, before making the main view transparent to fade out the
41 // overlay shield.
42 base::scoped_nsobject<NSView> childView_;
43 base::scoped_nsobject<NSImageView> imageView_;
44 base::scoped_nsobject<AutofillMessageStackView> messageStackView_;
45
46 scoped_ptr<ui::MultiAnimation> fadeOutAnimation_; // Animation rules.
47 scoped_ptr<AnimationDelegateBridge> animationDelegate_;
48
49 // Timer to control refresh rate of the overlay's state.
50 scoped_ptr<OverlayTimerBridge> refreshTimer_;
51
52 autofill::AutofillDialogViewDelegate* delegate_; // not owned, owns dialog.
53 }
54
55 // Designated initializer.
56 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate;
57
58 // Updates the state from the dialog controller.
59 - (void)updateState;
60
61 // Sets a specific state for the overlay.
62 - (void)setState:(const autofill::DialogOverlayState&)state;
63
64 // Start the animation sequence. At its end, the dialog will hide itself.
65 - (void)beginFadeOut;
66
67 // Get the preferred view height for a given width.
68 - (CGFloat)heightForWidth:(int)width;
69
70 @end
71
72 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
73
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698