Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(859)

Side by Side Diff: chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h

Issue 10573003: Simplify fullscreen exit bubble on mac; updating always creates one freshly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "base/mac/cocoa_protocols.h" 7 #import "base/mac/cocoa_protocols.h"
8 #include "base/memory/scoped_nsobject.h" 8 #include "base/memory/scoped_nsobject.h"
9 #include "chrome/browser/ui/fullscreen_exit_bubble_type.h" 9 #include "chrome/browser/ui/fullscreen_exit_bubble_type.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
11 11
12 @class BrowserWindowController; 12 @class BrowserWindowController;
13 class Browser; 13 class Browser;
14 @class GTMUILocalizerAndLayoutTweaker; 14 @class GTMUILocalizerAndLayoutTweaker;
15 15
16 // The FullscreenExitBubbleController manages the bubble that tells the user 16 // The FullscreenExitBubbleController manages the bubble that tells the user
17 // how to escape fullscreen mode. The bubble only appears when a tab requests 17 // how to escape fullscreen mode. The bubble only appears when a tab requests
18 // fullscreen mode via webkitRequestFullScreen(). 18 // fullscreen mode via webkitRequestFullScreen().
19 @interface FullscreenExitBubbleController : 19 @interface FullscreenExitBubbleController :
20 NSWindowController<NSTextViewDelegate, NSAnimationDelegate> { 20 NSWindowController<NSTextViewDelegate, NSAnimationDelegate> {
21 @private 21 @private
22 BrowserWindowController* owner_; // weak 22 BrowserWindowController* owner_; // weak
23 Browser* browser_; // weak 23 Browser* browser_; // weak
24 GURL url_; 24 GURL url_;
25 BOOL showButtons_;
26 FullscreenExitBubbleType bubbleType_; 25 FullscreenExitBubbleType bubbleType_;
27 26
28 @protected 27 @protected
29 IBOutlet NSTextField* exitLabelPlaceholder_; 28 IBOutlet NSTextField* exitLabelPlaceholder_;
30 IBOutlet NSTextField* messageLabel_; 29 IBOutlet NSTextField* messageLabel_;
31 IBOutlet NSButton* allowButton_; 30 IBOutlet NSButton* allowButton_;
32 IBOutlet NSButton* denyButton_; 31 IBOutlet NSButton* denyButton_;
33 IBOutlet GTMUILocalizerAndLayoutTweaker* tweaker_; 32 IBOutlet GTMUILocalizerAndLayoutTweaker* tweaker_;
34 33
35 // Text fields don't work as well with embedded links as text views, but 34 // Text fields don't work as well with embedded links as text views, but
(...skipping 14 matching lines...) Expand all
50 49
51 - (void)allow:(id)sender; 50 - (void)allow:(id)sender;
52 - (void)deny:(id)sender; 51 - (void)deny:(id)sender;
53 52
54 - (void)showWindow; 53 - (void)showWindow;
55 - (void)closeImmediately; 54 - (void)closeImmediately;
56 55
57 // Positions the fullscreen exit bubble in the top-center of the window. 56 // Positions the fullscreen exit bubble in the top-center of the window.
58 - (void)positionInWindowAtTop:(CGFloat)maxY width:(CGFloat)maxWidth; 57 - (void)positionInWindowAtTop:(CGFloat)maxY width:(CGFloat)maxWidth;
59 58
60 // Updates the bubble contents with |url| and |bubbleType|.
61 - (void)updateURL:(const GURL&)url
62 bubbleType:(FullscreenExitBubbleType)bubbleType;
63
64 @end 59 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698