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_VIEW_ID_UTIL_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_VIEW_ID_UTIL_H_ |
6 #define CHROME_BROWSER_UI_COCOA_VIEW_ID_UTIL_H_ | 6 #define CHROME_BROWSER_UI_COCOA_VIEW_ID_UTIL_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "chrome/browser/ui/view_ids.h" | 10 #include "chrome/browser/ui/view_ids.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 } // namespace view_id_util | 39 } // namespace view_id_util |
40 | 40 |
41 | 41 |
42 @interface NSView (ViewID) | 42 @interface NSView (ViewID) |
43 | 43 |
44 // Returns the ViewID associated to the receiver. The default implementation | 44 // Returns the ViewID associated to the receiver. The default implementation |
45 // looks up the view's ViewID in the internal view to ViewID map. A subclass may | 45 // looks up the view's ViewID in the internal view to ViewID map. A subclass may |
46 // override this method to return its fixed ViewID. | 46 // override this method to return its fixed ViewID. |
47 - (ViewID)viewID; | 47 - (ViewID)viewID; |
48 | 48 |
| 49 // Returns the ancestor view with a specific ViewID, or nil if no ancestor |
| 50 // view has that ViewID. |
| 51 - (NSView*)ancestorWithViewID:(ViewID)viewID; |
| 52 |
49 @end | 53 @end |
50 | 54 |
51 #endif // CHROME_BROWSER_UI_COCOA_VIEW_ID_UTIL_H_ | 55 #endif // CHROME_BROWSER_UI_COCOA_VIEW_ID_UTIL_H_ |
OLD | NEW |