OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_BASE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BASE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_COCOA_BASE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BASE_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 | 10 |
11 #include "base/scoped_nsobject.h" | 11 #include "base/scoped_nsobject.h" |
12 #include "gfx/rect.h" | 12 #include "ui/gfx/rect.h" |
13 | 13 |
14 // A view that provides common functionality that many views will need: | 14 // A view that provides common functionality that many views will need: |
15 // - Automatic registration for mouse-moved events. | 15 // - Automatic registration for mouse-moved events. |
16 // - Funneling of mouse and key events to two methods | 16 // - Funneling of mouse and key events to two methods |
17 // - Coordinate conversion utilities | 17 // - Coordinate conversion utilities |
18 | 18 |
19 @interface BaseView : NSView { | 19 @interface BaseView : NSView { |
20 @private | 20 @private |
21 NSTrackingArea *trackingArea_; | 21 NSTrackingArea *trackingArea_; |
22 BOOL dragging_; | 22 BOOL dragging_; |
(...skipping 13 matching lines...) Expand all Loading... |
36 @end | 36 @end |
37 | 37 |
38 // A notification that a view may issue when it receives first responder status. | 38 // A notification that a view may issue when it receives first responder status. |
39 // The name is |kViewDidBecomeFirstResponder|, the object is the view, and the | 39 // The name is |kViewDidBecomeFirstResponder|, the object is the view, and the |
40 // NSSelectionDirection is wrapped in an NSNumber under the key | 40 // NSSelectionDirection is wrapped in an NSNumber under the key |
41 // |kSelectionDirection|. | 41 // |kSelectionDirection|. |
42 extern NSString* kViewDidBecomeFirstResponder; | 42 extern NSString* kViewDidBecomeFirstResponder; |
43 extern NSString* kSelectionDirection; | 43 extern NSString* kSelectionDirection; |
44 | 44 |
45 #endif // CHROME_BROWSER_UI_COCOA_BASE_VIEW_H_ | 45 #endif // CHROME_BROWSER_UI_COCOA_BASE_VIEW_H_ |
OLD | NEW |