| 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 #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/bundle_locations.h" | 8 #include "base/mac/bundle_locations.h" |
| 9 #include "base/mac/mac_util.h" | 9 #include "base/mac/mac_util.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 - (void)allow:(id)sender { | 89 - (void)allow:(id)sender { |
| 90 // The mouselock code expects that mouse events reach the main window | 90 // The mouselock code expects that mouse events reach the main window |
| 91 // immediately, but the cursor is still over the bubble, which eats the | 91 // immediately, but the cursor is still over the bubble, which eats the |
| 92 // mouse events. Make the bubble transparent for mouse events. | 92 // mouse events. Make the bubble transparent for mouse events. |
| 93 if (bubbleType_ == FEB_TYPE_FULLSCREEN_MOUSELOCK_BUTTONS || | 93 if (bubbleType_ == FEB_TYPE_FULLSCREEN_MOUSELOCK_BUTTONS || |
| 94 bubbleType_ == FEB_TYPE_MOUSELOCK_BUTTONS) | 94 bubbleType_ == FEB_TYPE_MOUSELOCK_BUTTONS) |
| 95 [[self window] setIgnoresMouseEvents:YES]; | 95 [[self window] setIgnoresMouseEvents:YES]; |
| 96 | 96 |
| 97 DCHECK(fullscreen_bubble::ShowButtonsForType(bubbleType_)); | 97 DCHECK(fullscreen_bubble::ShowButtonsForType(bubbleType_)); |
| 98 browser_->OnAcceptFullscreenPermission( | 98 browser_->fullscreen_controller()->OnAcceptFullscreenPermission( |
| 99 url_, bubbleType_); | 99 url_, bubbleType_); |
| 100 } | 100 } |
| 101 | 101 |
| 102 - (void)deny:(id)sender { | 102 - (void)deny:(id)sender { |
| 103 DCHECK(fullscreen_bubble::ShowButtonsForType(bubbleType_)); | 103 DCHECK(fullscreen_bubble::ShowButtonsForType(bubbleType_)); |
| 104 browser_->OnDenyFullscreenPermission(bubbleType_); | 104 browser_->fullscreen_controller()->OnDenyFullscreenPermission(bubbleType_); |
| 105 } | 105 } |
| 106 | 106 |
| 107 - (void)showButtons:(BOOL)show { | 107 - (void)showButtons:(BOOL)show { |
| 108 [allowButton_ setHidden:!show]; | 108 [allowButton_ setHidden:!show]; |
| 109 [denyButton_ setHidden:!show]; | 109 [denyButton_ setHidden:!show]; |
| 110 [exitLabel_ setHidden:show]; | 110 [exitLabel_ setHidden:show]; |
| 111 } | 111 } |
| 112 | 112 |
| 113 // We want this to be a child of a browser window. addChildWindow: | 113 // We want this to be a child of a browser window. addChildWindow: |
| 114 // (called from this function) will bring the window on-screen; | 114 // (called from this function) will bring the window on-screen; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 - (void)hideSoon { | 301 - (void)hideSoon { |
| 302 hideTimer_.reset( | 302 hideTimer_.reset( |
| 303 [[NSTimer scheduledTimerWithTimeInterval:kInitialDelay | 303 [[NSTimer scheduledTimerWithTimeInterval:kInitialDelay |
| 304 target:self | 304 target:self |
| 305 selector:@selector(hideTimerFired:) | 305 selector:@selector(hideTimerFired:) |
| 306 userInfo:nil | 306 userInfo:nil |
| 307 repeats:NO] retain]); | 307 repeats:NO] retain]); |
| 308 } | 308 } |
| 309 | 309 |
| 310 @end | 310 @end |
| OLD | NEW |