OLD | NEW |
---|---|
(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_LOADING_SHIELD_CONTROLLER_H_ | |
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_LOADING_SHIELD_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 class AutofillLoadingAnimationBridge; | |
15 | |
16 namespace autofill { | |
17 class AutofillDialogViewDelegate; | |
18 class LoadingAnimation; | |
19 } | |
20 | |
21 @interface AutofillLoadingShieldController : NSViewController<AutofillLayout> { | |
groby-ooo-7-16
2013/11/16 01:34:59
Please add a comment
Ilya Sherman
2013/11/16 01:46:54
Done.
| |
22 @private | |
23 // The main label for the shield. | |
24 base::scoped_nsobject<NSTextField> message_; | |
groby-ooo-7-16
2013/11/16 01:34:59
Newline between commented vars.
Ilya Sherman
2013/11/16 01:46:54
Done.
| |
25 // The animate dots that follow the |message_|. | |
26 base::scoped_nsobject<NSArray> dots_; | |
27 | |
28 // C++ bridge class for animating the dots. | |
29 scoped_ptr<AutofillLoadingAnimationBridge> animationDriver_; | |
30 | |
31 autofill::AutofillDialogViewDelegate* delegate_; // not owned, owns dialog. | |
32 } | |
33 | |
34 // Designated initializer. | |
35 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate; | |
36 | |
37 // Updates the layout of the loading shield based on the |delegate_|'s state. | |
38 - (void)update; | |
39 | |
40 // Updates the positions of the dots to match the current frame of the | |
41 // |animation|. | |
groby-ooo-7-16
2013/11/16 01:34:59
Why not a const-ref? 80 chars limit? ;)
Ilya Sherman
2013/11/16 01:46:54
Done.
| |
42 - (void)relayoutDotsForSteppedAnimation:(autofill::LoadingAnimation*)animation; | |
43 | |
44 @end | |
45 | |
46 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_LOADING_SHIELD_CONTROLLER_H _ | |
OLD | NEW |