OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_OVERLAY_PANEL_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_OVERLAY_PANEL_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_OVERLAY_PANEL_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_OVERLAY_PANEL_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
11 | 11 |
12 @class HistoryOverlayView; | 12 @class HistoryOverlayView; |
13 | 13 |
14 enum HistoryOverlayMode { | 14 enum HistoryOverlayMode { |
15 kHistoryOverlayModeBack, | 15 kHistoryOverlayModeBack, |
16 kHistoryOverlayModeForward | 16 kHistoryOverlayModeForward |
17 }; | 17 }; |
18 | 18 |
19 // The HistoryOverlayController manages a view that is inserted atop the web | 19 // The HistoryOverlayController manages a view that is inserted atop the web |
20 // contents to provide visual feedback when the user is performing history | 20 // contents to provide visual feedback when the user is performing history |
21 // navigation gestures. | 21 // navigation gestures. |
22 @interface HistoryOverlayController : NSViewController { | 22 @interface HistoryOverlayController : NSViewController { |
23 @private | 23 @private |
24 HistoryOverlayMode mode_; | 24 HistoryOverlayMode mode_; |
25 // Strongly typed reference of self.view. | 25 // Strongly typed reference of self.view. |
26 scoped_nsobject<HistoryOverlayView> contentView_; | 26 base::scoped_nsobject<HistoryOverlayView> contentView_; |
27 // The view above which self.view is inserted as a subview. | 27 // The view above which self.view is inserted as a subview. |
28 scoped_nsobject<NSView> parent_; | 28 base::scoped_nsobject<NSView> parent_; |
29 } | 29 } |
30 | 30 |
31 // Designated initializer. | 31 // Designated initializer. |
32 - (id)initForMode:(HistoryOverlayMode)mode; | 32 - (id)initForMode:(HistoryOverlayMode)mode; |
33 | 33 |
34 // Shows the shield above |view|. | 34 // Shows the shield above |view|. |
35 - (void)showPanelForView:(NSView*)view; | 35 - (void)showPanelForView:(NSView*)view; |
36 | 36 |
37 // Updates the appearance of the overlay based on track gesture progress. | 37 // Updates the appearance of the overlay based on track gesture progress. |
38 - (void)setProgress:(CGFloat)gestureAmount; | 38 - (void)setProgress:(CGFloat)gestureAmount; |
39 | 39 |
40 // Fades the shield out and removes it from the view hierarchy. | 40 // Fades the shield out and removes it from the view hierarchy. |
41 - (void)dismiss; | 41 - (void)dismiss; |
42 | 42 |
43 @end | 43 @end |
44 | 44 |
45 #endif // CHROME_BROWSER_UI_COCOA_OVERLAY_PANEL_CONTROLLER_H_ | 45 #endif // CHROME_BROWSER_UI_COCOA_OVERLAY_PANEL_CONTROLLER_H_ |
OLD | NEW |