OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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_OVERLAY_PANEL_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_OVERLAY_PANEL_CONTROLLER_H_ |
| 7 #pragma once |
| 8 |
| 9 #import <Cocoa/Cocoa.h> |
| 10 |
| 11 #import "base/mac/cocoa_protocols.h" |
| 12 #include "base/memory/scoped_nsobject.h" |
| 13 |
| 14 @class OverlayFrameView; |
| 15 |
| 16 enum HistoryOverlayMode { |
| 17 kHistoryOverlayModeBack, |
| 18 kHistoryOverlayModeForward |
| 19 }; |
| 20 |
| 21 // The HistoryOverlayController manages the overlay HUD panel which displays |
| 22 // navigation gesture icons within a browser window. |
| 23 @interface HistoryOverlayController : NSWindowController<NSWindowDelegate> { |
| 24 @private |
| 25 HistoryOverlayMode mode_; |
| 26 |
| 27 // The content view of the window that this controller manages. |
| 28 OverlayFrameView* contentView_; // Weak, owned by the window. |
| 29 |
| 30 scoped_nsobject<NSWindow> parent_; |
| 31 } |
| 32 |
| 33 // Designated initializer. |
| 34 - (id)initForMode:(HistoryOverlayMode)mode; |
| 35 |
| 36 // Shows the panel. |
| 37 - (void)showPanelForWindow:(NSWindow*)window; |
| 38 |
| 39 // Updates the appearance of the overlay based on track gesture progress. |
| 40 - (void)setProgress:(CGFloat)gestureAmount; |
| 41 |
| 42 // Schedules a fade-out animation and then closes the window, |
| 43 // which will release the controller. |
| 44 - (void)dismiss; |
| 45 @end |
| 46 |
| 47 #endif // CHROME_BROWSER_UI_COCOA_OVERLAY_PANEL_CONTROLLER_H_ |
OLD | NEW |