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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/plus_decoration.h

Issue 10887029: Only show chrome2mobile in action box if it is enabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
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 CommandUpdater;
15 class LocationBarViewMac; 14 class LocationBarViewMac;
16 15
17 // Note: this file is under development (see crbug.com/138118). 16 // Note: this file is under development (see crbug.com/138118).
18 17
19 // Plus icon on the right side of the location bar. 18 // Plus icon on the right side of the location bar.
20 class PlusDecoration : public ImageDecoration { 19 class PlusDecoration : public ImageDecoration {
21 public: 20 public:
22 PlusDecoration(LocationBarViewMac* owner, 21 PlusDecoration(LocationBarViewMac* owner, Browser* browser);
23 CommandUpdater* command_updater,
24 Browser* browser);
25 virtual ~PlusDecoration(); 22 virtual ~PlusDecoration();
26 23
27 // Helper to get where the action box menu and bubble point should be 24 // Helper to get where the action box menu and bubble point should be
28 // anchored. Similar to |PageActionDecoration| or |StarDecoration|. 25 // anchored. Similar to |PageActionDecoration| or |StarDecoration|.
29 NSPoint GetActionBoxAnchorPoint(); 26 NSPoint GetActionBoxAnchorPoint();
30 27
31 // Implement |LocationBarDecoration|. 28 // Implement |LocationBarDecoration|.
32 virtual bool AcceptsMousePress() OVERRIDE; 29 virtual bool AcceptsMousePress() OVERRIDE;
33 virtual bool OnMousePressed(NSRect frame) OVERRIDE; 30 virtual bool OnMousePressed(NSRect frame) OVERRIDE;
34 virtual NSString* GetToolTip() OVERRIDE; 31 virtual NSString* GetToolTip() OVERRIDE;
35 32
36 private: 33 private:
37 // Owner of the decoration, used to obtain the menu. 34 // Owner of the decoration, used to obtain the menu.
38 LocationBarViewMac* owner_; 35 LocationBarViewMac* owner_;
39 36
40 CommandUpdater* command_updater_; // Weak, owned by Browser.
41
42 Browser* browser_; 37 Browser* browser_;
43 38
44 // The string to show for a tooltip. 39 // The string to show for a tooltip.
45 scoped_nsobject<NSString> tooltip_; 40 scoped_nsobject<NSString> tooltip_;
46 41
47 DISALLOW_COPY_AND_ASSIGN(PlusDecoration); 42 DISALLOW_COPY_AND_ASSIGN(PlusDecoration);
48 }; 43 };
49 44
50 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PLUS_DECORATION_H_ 45 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PLUS_DECORATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698