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

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: Allow animated overlays. 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 } // namespace autofill
18
19 namespace ui {
20 class Animation;
21 class MultiAnimation;
22 } // namespace 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 ChromiumAnimationDelegate
31 - (void)animationProgressed:(const ui::Animation*)animation;
32 - (void)animationEnded:(const ui::Animation*)animation;
33 @end
34
35
36 @interface AutofillOverlayController :
37 NSViewController<ChromiumAnimationDelegate, AutofillLayout> {
38 @private
39 base::scoped_nsobject<NSBox> view_; // The main view.
40 base::scoped_nsobject<NSView> childView_; // Contains all UI elements.
sail 2013/09/04 21:18:51 maybe add a comment that this is used for the fade
groby-ooo-7-16 2013/09/04 22:19:01 Done.
41 base::scoped_nsobject<NSImageView> imageView_;
42 base::scoped_nsobject<AutofillMessageStackView> messageStackView_;
43
44 scoped_ptr<ui::MultiAnimation> fadeOutAnimation_; // Animation rules.
45 scoped_ptr<AnimationDelegateBridge> animationDelegate_;
46
47 // Timer to control refresh rate of the overlay's state.
48 scoped_ptr<OverlayTimerBridge> refreshTimer_;
49
50 autofill::AutofillDialogViewDelegate* delegate_; // not owned, owns dialog.
51 }
52
53 // Designated initializer.
54 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate;
55
56 // Updates the state from the dialog controller.
57 - (void)updateState;
58
59 // Start the animation sequence. At its end, the dialog will hide itself.
60 - (void)beginFadeOut;
61
62 // Get the preferred view height for a given width.
63 - (int)getHeightForWidth:(int)width;
sail 2013/09/04 21:18:51 Use CGFloat instead?
groby-ooo-7-16 2013/09/04 22:19:01 Reluctant, because '0' is a special case - and equ
sail 2013/09/04 23:08:25 I think it's still a good idea to make this a CGFl
groby-ooo-7-16 2013/09/05 00:44:20 Done, then. On 2013/09/04 23:08:25, sail wrote:
64
65 @end
66
67 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
68
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698