| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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_MENU_TRACKED_ROOT_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_WRENCH_MENU_MENU_TRACKED_ROOT_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_MENU_TRACKED_ROOT_VIEW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_WRENCH_MENU_MENU_TRACKED_ROOT_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| 11 // An instance of MenuTrackedRootView should be the root of the view hierarchy | 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- | 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 | 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]|. | 14 // over the menu item, it will cancel tracking on the |[menuItem_ menu]|. |
| 15 @interface MenuTrackedRootView : NSView { | 15 @interface MenuTrackedRootView : NSView { |
| 16 @private | 16 @private |
| 17 // The menu item whose custom view's root view is an instance of this class. | 17 // The menu item whose custom view's root view is an instance of this class. |
| 18 NSMenuItem* menuItem_; // weak | 18 NSMenuItem* menuItem_; // weak |
| 19 } | 19 } |
| 20 | 20 |
| 21 @property (assign, nonatomic) NSMenuItem* menuItem; | 21 @property (assign, nonatomic) NSMenuItem* menuItem; |
| 22 | 22 |
| 23 @end | 23 @end |
| 24 | 24 |
| 25 #endif // CHROME_BROWSER_UI_COCOA_MENU_TRACKED_ROOT_VIEW_H_ | 25 #endif // CHROME_BROWSER_UI_COCOA_WRENCH_MENU_MENU_TRACKED_ROOT_VIEW_H_ |
| OLD | NEW |