Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: chrome/browser/cocoa/location_bar/location_icon_decoration.h

Issue 2825048: [Mac] Allow omnibox decorations to decline mouse events. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Rohit's comment comment, and merge with content-setting change. Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_ 5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_
6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_ 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "chrome/browser/cocoa/location_bar/image_decoration.h" 10 #include "chrome/browser/cocoa/location_bar/image_decoration.h"
11 11
12 class LocationBarViewMac; 12 class LocationBarViewMac;
13 13
14 // LocationIconDecoration is used to display an icon to the left of 14 // LocationIconDecoration is used to display an icon to the left of
15 // the address. 15 // the address.
16 16
17 class LocationIconDecoration : public ImageDecoration { 17 class LocationIconDecoration : public ImageDecoration {
18 public: 18 public:
19 explicit LocationIconDecoration(LocationBarViewMac* owner); 19 explicit LocationIconDecoration(LocationBarViewMac* owner);
20 virtual ~LocationIconDecoration(); 20 virtual ~LocationIconDecoration();
21 21
22 // Allow dragging the current URL. 22 // Allow dragging the current URL.
23 virtual bool IsDraggable(); 23 virtual bool IsDraggable();
24 virtual NSPasteboard* GetDragPasteboard(); 24 virtual NSPasteboard* GetDragPasteboard();
25 virtual NSImage* GetDragImage() { return GetImage(); } 25 virtual NSImage* GetDragImage() { return GetImage(); }
26 26
27 // Show the page info panel on click. 27 // Show the page info panel on click.
28 virtual bool OnMousePressed(NSRect frame); 28 virtual bool OnMousePressed(NSRect frame);
29 virtual bool AcceptsMousePress() { return true; }
29 30
30 private: 31 private:
31 // The location bar view that owns us. 32 // The location bar view that owns us.
32 LocationBarViewMac* owner_; 33 LocationBarViewMac* owner_;
33 34
34 DISALLOW_COPY_AND_ASSIGN(LocationIconDecoration); 35 DISALLOW_COPY_AND_ASSIGN(LocationIconDecoration);
35 }; 36 };
36 37
37 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_ 38 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698