OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_COCOA_LOCATION_BAR_PLUS_DECORATION_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PLUS_DECORATION_H_ |
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PLUS_DECORATION_H_ | 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PLUS_DECORATION_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/memory/scoped_nsobject.h" |
11 #include "chrome/browser/ui/cocoa/location_bar/image_decoration.h" | 11 #include "chrome/browser/ui/cocoa/location_bar/image_decoration.h" |
12 | 12 |
13 class Browser; | 13 class Browser; |
14 class Profile; | |
Scott Hess - ex-Googler
2012/08/13 18:54:43
Alphabetize.
beaudoin
2012/08/17 20:04:21
Profile is gone.
Done.
| |
14 class CommandUpdater; | 15 class CommandUpdater; |
15 class LocationBarViewMac; | 16 class LocationBarViewMac; |
16 | 17 |
17 // Note: this file is under development (see crbug.com/138118). | 18 // Note: this file is under development (see crbug.com/138118). |
18 | 19 |
19 // Plus icon on the right side of the location bar. | 20 // Plus icon on the right side of the location bar. |
20 class PlusDecoration : public ImageDecoration { | 21 class PlusDecoration : public ImageDecoration { |
21 public: | 22 public: |
22 PlusDecoration(LocationBarViewMac* owner, | 23 PlusDecoration(LocationBarViewMac* owner, |
23 CommandUpdater* command_updater, | 24 CommandUpdater* command_updater, |
24 Browser* browser); | 25 Browser* browser, |
26 Profile* profile); | |
25 virtual ~PlusDecoration(); | 27 virtual ~PlusDecoration(); |
26 | 28 |
27 // Implement |LocationBarDecoration|. | 29 // Implement |LocationBarDecoration|. |
28 virtual bool AcceptsMousePress() OVERRIDE; | 30 virtual bool AcceptsMousePress() OVERRIDE; |
29 virtual bool OnMousePressed(NSRect frame) OVERRIDE; | 31 virtual bool OnMousePressed(NSRect frame) OVERRIDE; |
30 virtual NSString* GetToolTip() OVERRIDE; | 32 virtual NSString* GetToolTip() OVERRIDE; |
31 | 33 |
32 private: | 34 private: |
33 // Owner of the decoration, used to obtain the menu. | 35 // Owner of the decoration, used to obtain the menu. |
34 LocationBarViewMac* owner_; | 36 LocationBarViewMac* owner_; |
35 | 37 |
36 CommandUpdater* command_updater_; // Weak, owned by Browser. | 38 CommandUpdater* command_updater_; // Weak, owned by Browser. |
37 | 39 |
38 Browser* browser_; | 40 Browser* browser_; |
41 Profile* profile_; | |
39 | 42 |
40 // The string to show for a tooltip. | 43 // The string to show for a tooltip. |
41 scoped_nsobject<NSString> tooltip_; | 44 scoped_nsobject<NSString> tooltip_; |
42 | 45 |
43 DISALLOW_COPY_AND_ASSIGN(PlusDecoration); | 46 DISALLOW_COPY_AND_ASSIGN(PlusDecoration); |
44 }; | 47 }; |
45 | 48 |
46 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PLUS_DECORATION_H_ | 49 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PLUS_DECORATION_H_ |
OLD | NEW |