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

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

Issue 8399017: Fix a crash in FullscreenExitBubbleController when the user clicks the "Exit full screen" button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 years, 1 month 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 #include "base/logging.h" // for NOTREACHED() 7 #include "base/logging.h" // for NOTREACHED()
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 DCHECK(fullscreen_bubble::ShowButtonsForType(bubbleType_)); 86 DCHECK(fullscreen_bubble::ShowButtonsForType(bubbleType_));
87 browser_->OnAcceptFullscreenPermission( 87 browser_->OnAcceptFullscreenPermission(
88 url_, bubbleType_); 88 url_, bubbleType_);
89 [self showButtons:NO]; 89 [self showButtons:NO];
90 [self hideSoon]; 90 [self hideSoon];
91 } 91 }
92 92
93 - (void)deny:(id)sender { 93 - (void)deny:(id)sender {
94 DCHECK(fullscreen_bubble::ShowButtonsForType(bubbleType_)); 94 DCHECK(fullscreen_bubble::ShowButtonsForType(bubbleType_));
95 browser_->OnDenyFullscreenPermission(bubbleType_); 95 browser_->OnDenyFullscreenPermission(bubbleType_);
96 [self hideSoon];
97 } 96 }
98 97
99 - (void)showButtons:(BOOL)show { 98 - (void)showButtons:(BOOL)show {
100 [allowButton_ setHidden:!show]; 99 [allowButton_ setHidden:!show];
101 [denyButton_ setHidden:!show]; 100 [denyButton_ setHidden:!show];
102 [exitLabel_ setHidden:show]; 101 [exitLabel_ setHidden:show];
103 } 102 }
104 103
105 // We want this to be a child of a browser window. addChildWindow: 104 // We want this to be a child of a browser window. addChildWindow:
106 // (called from this function) will bring the window on-screen; 105 // (called from this function) will bring the window on-screen;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 - (void)hideSoon { 317 - (void)hideSoon {
319 hideTimer_.reset( 318 hideTimer_.reset(
320 [[NSTimer scheduledTimerWithTimeInterval:kInitialDelay 319 [[NSTimer scheduledTimerWithTimeInterval:kInitialDelay
321 target:self 320 target:self
322 selector:@selector(hideTimerFired:) 321 selector:@selector(hideTimerFired:)
323 userInfo:nil 322 userInfo:nil
324 repeats:NO] retain]); 323 repeats:NO] retain]);
325 } 324 }
326 325
327 @end 326 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698