- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / wrench_menu / menu_tracked_root_view.h
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_WRENCH_MENU_MENU_TRACKED_ROOT_VIEW_H_
6 #define CHROME_BROWSER_UI_COCOA_WRENCH_MENU_MENU_TRACKED_ROOT_VIEW_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 // An instance of MenuTrackedRootView should be the root of the view hierarchy
11 // of the custom view of NSMenuItems. If the user opens the menu in a non-
12 // sticky fashion (i.e. clicks, holds, and drags) and then releases the mouse
13 // over the menu item, it will cancel tracking on the |[menuItem_ menu]|.
14 @interface MenuTrackedRootView : NSView {
15  @private
16   // The menu item whose custom view's root view is an instance of this class.
17   NSMenuItem* menuItem_;  // weak
18 }
19
20 @property(assign, nonatomic) NSMenuItem* menuItem;
21
22 @end
23
24 #endif  // CHROME_BROWSER_UI_COCOA_WRENCH_MENU_MENU_TRACKED_ROOT_VIEW_H_