Index: chrome/browser/ui/cocoa/autofill/autofill_loading_shield_controller.h |
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_loading_shield_controller.h b/chrome/browser/ui/cocoa/autofill/autofill_loading_shield_controller.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7b6e456d731f6115d86fa5a889ea86050db424a9 |
--- /dev/null |
+++ b/chrome/browser/ui/cocoa/autofill/autofill_loading_shield_controller.h |
@@ -0,0 +1,46 @@ |
+// 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_LOADING_SHIELD_CONTROLLER_H_ |
+#define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_LOADING_SHIELD_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" |
+ |
+class AutofillLoadingAnimationBridge; |
+ |
+namespace autofill { |
+class AutofillDialogViewDelegate; |
+class LoadingAnimation; |
+} |
+ |
+@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.
|
+ @private |
+ // The main label for the shield. |
+ 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.
|
+ // The animate dots that follow the |message_|. |
+ base::scoped_nsobject<NSArray> dots_; |
+ |
+ // C++ bridge class for animating the dots. |
+ scoped_ptr<AutofillLoadingAnimationBridge> animationDriver_; |
+ |
+ autofill::AutofillDialogViewDelegate* delegate_; // not owned, owns dialog. |
+} |
+ |
+// Designated initializer. |
+- (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate; |
+ |
+// Updates the layout of the loading shield based on the |delegate_|'s state. |
+- (void)update; |
+ |
+// Updates the positions of the dots to match the current frame of the |
+// |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.
|
+- (void)relayoutDotsForSteppedAnimation:(autofill::LoadingAnimation*)animation; |
+ |
+@end |
+ |
+#endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_LOADING_SHIELD_CONTROLLER_H_ |