| Index: chrome/browser/ui/cocoa/location_bar/secure_verbose_bubble_decoration.h
|
| diff --git a/chrome/browser/ui/cocoa/location_bar/secure_verbose_bubble_decoration.h b/chrome/browser/ui/cocoa/location_bar/secure_verbose_bubble_decoration.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..beebeb37c7c4c0f186713e18e7284394eb3d2d56
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/cocoa/location_bar/secure_verbose_bubble_decoration.h
|
| @@ -0,0 +1,59 @@
|
| +// Copyright (c) 2011 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_LOCATION_BAR_SECURE_VERBOSE_BUBBLE_DECORATION_H_
|
| +#define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_SECURE_VERBOSE_BUBBLE_DECORATION_H_
|
| +
|
| +#import <Cocoa/Cocoa.h>
|
| +
|
| +#include "base/macros.h"
|
| +#include "chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h"
|
| +
|
| +// Draw the secure verbose bubble.
|
| +// The bubble is exactly the same as the EV bubble, but potentially with a
|
| +// different security icon and color.
|
| +
|
| +class LocationBarViewMac;
|
| +class LocationIconDecoration;
|
| +@class SecureVerboseAnimation;
|
| +
|
| +class SecureVerboseBubbleDecoration : public EVBubbleDecoration {
|
| + public:
|
| + explicit SecureVerboseBubbleDecoration(LocationIconDecoration* location_icon,
|
| + LocationBarViewMac* owner);
|
| + ~SecureVerboseBubbleDecoration() override;
|
| +
|
| + // Set the color of the label.
|
| + void SetLabelColor(SkColor color);
|
| +
|
| + // Called by SecureVerboseAnimation when the animation has progressed.
|
| + void OnAnimationProgressed();
|
| +
|
| + // Starts the animation. If the animation has already started, it will
|
| + // restart.
|
| + void StartAnimation();
|
| +
|
| + // Implement |LocationBarDecoration|.
|
| + CGFloat GetWidthForSpace(CGFloat width) override;
|
| + void DrawInFrame(NSRect frame, NSView* control_view) override;
|
| +
|
| + // Implement |BubbleDecoration|.
|
| + NSColor* GetBackgroundBorderColor() override;
|
| +
|
| + private:
|
| + // Returns the animation progress. Return 1.0 if the animation isn't running.
|
| + CGFloat GetAnimationProgress() const;
|
| +
|
| + // The color of the label's text. The default color is kGoogleGreen700.
|
| + SkColor label_color_;
|
| +
|
| + // The animation.
|
| + base::scoped_nsobject<SecureVerboseAnimation> animation_;
|
| +
|
| + LocationBarViewMac* owner_; // weak
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SecureVerboseBubbleDecoration);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_SECURE_VERBOSE_BUBBLE_DECORATION_H_
|
|
|