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

Unified Diff: ui/base/cocoa/controls/hover_image_menu_button.h

Issue 15955003: Menu for the OSX app launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/cocoa/current_user_menu_item_view.mm ('k') | ui/base/cocoa/controls/hover_image_menu_button.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cocoa/controls/hover_image_menu_button.h
diff --git a/ui/base/cocoa/controls/hover_image_menu_button.h b/ui/base/cocoa/controls/hover_image_menu_button.h
new file mode 100644
index 0000000000000000000000000000000000000000..f6af7bf894ceab39f9dbb18fba641f982afe7814
--- /dev/null
+++ b/ui/base/cocoa/controls/hover_image_menu_button.h
@@ -0,0 +1,29 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_COCOA_CONTROLS_HOVER_IMAGE_MENU_BUTTON_H_
+#define UI_BASE_COCOA_CONTROLS_HOVER_IMAGE_MENU_BUTTON_H_
+
+#import <Cocoa/Cocoa.h>
+
+#import "ui/base/cocoa/tracking_area.h"
+#include "ui/base/ui_export.h"
+
+@class HoverImageMenuButtonCell;
+
+// An NSPopUpButton that additionally tracks mouseover state and calls
+// [[self cell] setHovered:flag] when the hover state changes. Uses
+// HoverImageMenuButtonCell as the default cellClass. Note that the menu item at
+// index 0 is ignored and client code should populate it with a dummy item.
+UI_EXPORT
+@interface HoverImageMenuButton : NSPopUpButton {
+ @private
+ ui::ScopedCrTrackingArea trackingArea_;
+}
+
+- (HoverImageMenuButtonCell*)hoverImageMenuButtonCell;
+
+@end
+
+#endif // UI_BASE_COCOA_CONTROLS_HOVER_IMAGE_MENU_BUTTON_H_
« no previous file with comments | « ui/app_list/cocoa/current_user_menu_item_view.mm ('k') | ui/base/cocoa/controls/hover_image_menu_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698