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

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

Issue 944533004: Mac: Make bubble windows (not their controller) responsible for calling removeChildWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/info_bubble_window.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/base_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/bundle_locations.h" 8 #include "base/mac/bundle_locations.h"
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 if (resignationObserver_) { 196 if (resignationObserver_) {
197 [[NSNotificationCenter defaultCenter] 197 [[NSNotificationCenter defaultCenter]
198 removeObserver:resignationObserver_ 198 removeObserver:resignationObserver_
199 name:NSWindowDidResignKeyNotification 199 name:NSWindowDidResignKeyNotification
200 object:nil]; 200 object:nil];
201 resignationObserver_ = nil; 201 resignationObserver_ = nil;
202 } 202 }
203 203
204 tabStripObserverBridge_.reset(); 204 tabStripObserverBridge_.reset();
205
206 NSWindow* window = [self window];
207 [[window parentWindow] removeChildWindow:window];
208 } 205 }
209 206
210 - (void)windowWillClose:(NSNotification*)notification { 207 - (void)windowWillClose:(NSNotification*)notification {
211 [self closeCleanup]; 208 [self closeCleanup];
212 [[NSNotificationCenter defaultCenter] removeObserver:self]; 209 [[NSNotificationCenter defaultCenter] removeObserver:self];
213 [self autorelease]; 210 [self autorelease];
214 } 211 }
215 212
216 // We want this to be a child of a browser window. addChildWindow: 213 // We want this to be a child of a browser window. addChildWindow:
217 // (called from this function) will bring the window on-screen; 214 // (called from this function) will bring the window on-screen;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 378
382 - (void)activateTabWithContents:(content::WebContents*)newContents 379 - (void)activateTabWithContents:(content::WebContents*)newContents
383 previousContents:(content::WebContents*)oldContents 380 previousContents:(content::WebContents*)oldContents
384 atIndex:(NSInteger)index 381 atIndex:(NSInteger)index
385 reason:(int)reason { 382 reason:(int)reason {
386 // The user switched tabs; close. 383 // The user switched tabs; close.
387 [self close]; 384 [self close];
388 } 385 }
389 386
390 @end // BaseBubbleController 387 @end // BaseBubbleController
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/info_bubble_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698