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