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

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

Issue 10824307: Port Extension Commands to Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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_PAGE_ACTION_DECORATION_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_
7 7
8 #include "chrome/browser/extensions/image_loading_tracker.h" 8 #include "chrome/browser/extensions/image_loading_tracker.h"
9 #import "chrome/browser/ui/cocoa/location_bar/image_decoration.h" 9 #import "chrome/browser/ui/cocoa/location_bar/image_decoration.h"
10 #include "chrome/common/extensions/extension_action.h" 10 #include "chrome/common/extensions/extension_action.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 NSPoint GetBubblePointInFrame(NSRect frame); 55 NSPoint GetBubblePointInFrame(NSRect frame);
56 56
57 // Overridden from |LocationBarDecoration| 57 // Overridden from |LocationBarDecoration|
58 virtual CGFloat GetWidthForSpace(CGFloat width) OVERRIDE; 58 virtual CGFloat GetWidthForSpace(CGFloat width) OVERRIDE;
59 virtual bool AcceptsMousePress() OVERRIDE; 59 virtual bool AcceptsMousePress() OVERRIDE;
60 virtual bool OnMousePressed(NSRect frame) OVERRIDE; 60 virtual bool OnMousePressed(NSRect frame) OVERRIDE;
61 virtual NSString* GetToolTip() OVERRIDE; 61 virtual NSString* GetToolTip() OVERRIDE;
62 virtual NSMenu* GetMenu() OVERRIDE; 62 virtual NSMenu* GetMenu() OVERRIDE;
63 63
64 private: 64 private:
65 // Activate the page action in the given |frame|.
66 bool ActivatePageAction(NSRect frame);
67
65 // Show the popup in the frame, with the given URL. 68 // Show the popup in the frame, with the given URL.
66 void ShowPopup(const NSRect& frame, const GURL& popup_url); 69 void ShowPopup(const NSRect& frame, const GURL& popup_url);
67 70
68 // Overridden from ExtensionAction::IconAnimation::Observer. 71 // Overridden from ExtensionAction::IconAnimation::Observer.
69 virtual void OnIconChanged( 72 virtual void OnIconChanged(
70 const ExtensionAction::IconAnimation& animation) OVERRIDE; 73 const ExtensionAction::IconAnimation& animation) OVERRIDE;
71 74
72 // Overridden from NotificationObserver: 75 // Overridden from NotificationObserver:
73 virtual void Observe(int type, 76 virtual void Observe(int type,
74 const content::NotificationSource& source, 77 const content::NotificationSource& source,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 scoped_icon_animation_observer_; 114 scoped_icon_animation_observer_;
112 115
113 // Used to register for notifications received by 116 // Used to register for notifications received by
114 // NotificationObserver. 117 // NotificationObserver.
115 content::NotificationRegistrar registrar_; 118 content::NotificationRegistrar registrar_;
116 119
117 DISALLOW_COPY_AND_ASSIGN(PageActionDecoration); 120 DISALLOW_COPY_AND_ASSIGN(PageActionDecoration);
118 }; 121 };
119 122
120 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ 123 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698