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

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: Review fixes & missing test file. 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 base::scoped_nsobject<NSView> childView_; // Contains all UI elements.
40 base::scoped_nsobject<NSImageView> imageView_;
41 base::scoped_nsobject<AutofillMessageStackView> messageStackView_;
42
43 scoped_ptr<ui::MultiAnimation> fadeOutAnimation_; // Animation rules.
44 scoped_ptr<AnimationDelegateBridge> animationDelegate_;
45
46 // Timer to control refresh rate of the overlay's state.
47 scoped_ptr<OverlayTimerBridge> refreshTimer_;
48
49 autofill::AutofillDialogViewDelegate* delegate_; // not owned, owns dialog.
50 }
51
52 // Designated initializer.
53 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate;
54
55 // Updates the state from the dialog controller.
56 - (void)updateState;
57
58 // Start the animation sequence. At its end, the dialog will hide itself.
59 - (void)beginFadeOut;
60
61 // Get the preferred view height for a given width.
62 - (int)heightForWidth:(int)width;
63
64 @end
65
66 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
67
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698