| Index: chrome/browser/ui/cocoa/location_bar/origin_chip_decoration.h
|
| diff --git a/chrome/browser/ui/cocoa/location_bar/origin_chip_decoration.h b/chrome/browser/ui/cocoa/location_bar/origin_chip_decoration.h
|
| index 2b0fee9974a9b194970cb5bfe697094b6a856442..e05c2886f2d8fc0dc3159c8dcb2ccd2d2a666bdd 100644
|
| --- a/chrome/browser/ui/cocoa/location_bar/origin_chip_decoration.h
|
| +++ b/chrome/browser/ui/cocoa/location_bar/origin_chip_decoration.h
|
| @@ -14,6 +14,7 @@
|
| #include "chrome/browser/ui/toolbar/origin_chip_info.h"
|
|
|
| class LocationBarViewMac;
|
| +class LocationIconDecoration;
|
|
|
| namespace content {
|
| class WebContents;
|
| @@ -26,7 +27,8 @@ class OriginChipDecoration : public ButtonDecoration,
|
| public extensions::IconImage::Observer,
|
| public SafeBrowsingUIManager::Observer {
|
| public:
|
| - explicit OriginChipDecoration(LocationBarViewMac* owner);
|
| + OriginChipDecoration(LocationBarViewMac* owner,
|
| + LocationIconDecoration* location_icon);
|
| virtual ~OriginChipDecoration();
|
|
|
| // Updates the origin chip's content, and display state.
|
| @@ -36,7 +38,8 @@ class OriginChipDecoration : public ButtonDecoration,
|
| virtual CGFloat GetWidthForSpace(CGFloat width) OVERRIDE;
|
| virtual void DrawInFrame(NSRect frame, NSView* control_view) OVERRIDE;
|
| virtual NSString* GetToolTip() OVERRIDE;
|
| - virtual bool OnMousePressed(NSRect frame) OVERRIDE;
|
| + virtual bool OnMousePressed(NSRect frame, NSPoint location) OVERRIDE;
|
| + virtual NSPoint GetBubblePointInFrame(NSRect frame) OVERRIDE;
|
|
|
| // Implement |IconImage::Observer|.
|
| virtual void OnExtensionIconImageChanged(
|
| @@ -59,12 +62,19 @@ class OriginChipDecoration : public ButtonDecoration,
|
| // extension.
|
| base::scoped_nsobject<NSImage> extension_icon_;
|
|
|
| + // The rectangle where the icon was last drawn. Used for hit testing to
|
| + // display the permissions bubble.
|
| + NSRect icon_rect_;
|
| +
|
| // Manages information to be displayed on the origin chip.
|
| OriginChipInfo info_;
|
|
|
| // The label currently displayed in the chip.
|
| base::scoped_nsobject<NSString> label_;
|
|
|
| + // The location icon decoration. Weak.
|
| + LocationIconDecoration* location_icon_;
|
| +
|
| // The control view that owns this. Weak.
|
| LocationBarViewMac* owner_;
|
|
|
|
|