| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_COCOA_MENU_TRACKED_ROOT_VIEW_H_ | |
| 6 #define CHROME_BROWSER_UI_COCOA_MENU_TRACKED_ROOT_VIEW_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #import <Cocoa/Cocoa.h> | |
| 10 | |
| 11 // An instance of MenuTrackedRootView should be the root of the view hierarchy | |
| 12 // of the custom view of NSMenuItems. If the user opens the menu in a non- | |
| 13 // sticky fashion (i.e. clicks, holds, and drags) and then releases the mouse | |
| 14 // over the menu item, it will cancel tracking on the |[menuItem_ menu]|. | |
| 15 @interface MenuTrackedRootView : NSView { | |
| 16 @private | |
| 17 // The menu item whose custom view's root view is an instance of this class. | |
| 18 NSMenuItem* menuItem_; // weak | |
| 19 } | |
| 20 | |
| 21 @property (assign, nonatomic) NSMenuItem* menuItem; | |
| 22 | |
| 23 @end | |
| 24 | |
| 25 #endif // CHROME_BROWSER_UI_COCOA_MENU_TRACKED_ROOT_VIEW_H_ | |
| OLD | NEW |