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

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

Issue 2459653005: [Mac] Refactor the Fullscreen Toolbar Visibility Locks (Closed)
Patch Set: Fix for rsesek Created 4 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
OLDNEW
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 "chrome/browser/ui/cocoa/global_error_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/global_error_bubble_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 ds = [[self bubble] convertSize:ds toView:nil]; 120 ds = [[self bubble] convertSize:ds toView:nil];
121 121
122 frame.origin.y -= ds.height; 122 frame.origin.y -= ds.height;
123 frame.size.height += ds.height; 123 frame.size.height += ds.height;
124 [[self window] setFrame:frame display:YES]; 124 [[self window] setFrame:frame display:YES];
125 } 125 }
126 126
127 - (void)showWindow:(id)sender { 127 - (void)showWindow:(id)sender {
128 BrowserWindowController* bwc = [BrowserWindowController 128 BrowserWindowController* bwc = [BrowserWindowController
129 browserWindowControllerForWindow:[self parentWindow]]; 129 browserWindowControllerForWindow:[self parentWindow]];
130 [bwc lockBarVisibilityForOwner:self withAnimation:NO]; 130 [bwc lockToolbarVisibilityForOwner:self withAnimation:NO];
131 [super showWindow:sender]; 131 [super showWindow:sender];
132 } 132 }
133 133
134 - (void)close { 134 - (void)close {
135 if (error_) 135 if (error_)
136 error_->BubbleViewDidClose(browser_); 136 error_->BubbleViewDidClose(browser_);
137 bridge_.reset(); 137 bridge_.reset();
138 BrowserWindowController* bwc = [BrowserWindowController 138 BrowserWindowController* bwc = [BrowserWindowController
139 browserWindowControllerForWindow:[self parentWindow]]; 139 browserWindowControllerForWindow:[self parentWindow]];
140 [bwc releaseBarVisibilityForOwner:self withAnimation:YES]; 140 [bwc releaseToolbarVisibilityForOwner:self withAnimation:YES];
141 [super close]; 141 [super close];
142 } 142 }
143 143
144 - (IBAction)onAccept:(id)sender { 144 - (IBAction)onAccept:(id)sender {
145 if (error_) 145 if (error_)
146 error_->BubbleViewAcceptButtonPressed(browser_); 146 error_->BubbleViewAcceptButtonPressed(browser_);
147 [self close]; 147 [self close];
148 } 148 }
149 149
150 - (IBAction)onCancel:(id)sender { 150 - (IBAction)onCancel:(id)sender {
151 if (error_) 151 if (error_)
152 error_->BubbleViewCancelButtonPressed(browser_); 152 error_->BubbleViewCancelButtonPressed(browser_);
153 [self close]; 153 [self close];
154 } 154 }
155 155
156 @end 156 @end
157 157
158 GlobalErrorBubbleViewBase* GlobalErrorBubbleViewBase::ShowStandardBubbleView( 158 GlobalErrorBubbleViewBase* GlobalErrorBubbleViewBase::ShowStandardBubbleView(
159 Browser* browser, 159 Browser* browser,
160 const base::WeakPtr<GlobalErrorWithStandardBubble>& error) { 160 const base::WeakPtr<GlobalErrorWithStandardBubble>& error) {
161 return [GlobalErrorBubbleController showForBrowser:browser error:error]; 161 return [GlobalErrorBubbleController showForBrowser:browser error:error];
162 } 162 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698