1 // Copyright (c) 2011 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.
5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_
8 #import <Cocoa/Cocoa.h>
10 #include "chrome/browser/ui/cocoa/location_bar/image_decoration.h"
12 class LocationBarViewMac;
14 // LocationIconDecoration is used to display an icon to the left of
17 class LocationIconDecoration : public ImageDecoration {
19 explicit LocationIconDecoration(LocationBarViewMac* owner);
20 ~LocationIconDecoration() override;
22 // Allow dragging the current URL.
23 bool IsDraggable() override;
24 NSPasteboard* GetDragPasteboard() override;
25 NSImage* GetDragImage() override;
26 NSRect GetDragImageFrame(NSRect frame) override;
28 // Show the page info panel on click.
29 bool OnMousePressed(NSRect frame, NSPoint location) override;
30 bool AcceptsMousePress() override;
31 NSString* GetToolTip() override;
32 NSPoint GetBubblePointInFrame(NSRect frame) override;
36 // The location bar view that owns us.
37 LocationBarViewMac* owner_;
39 DISALLOW_COPY_AND_ASSIGN(LocationIconDecoration);
42 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_