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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm

Issue 12388035: Don't crash when quitting while an extension popup is open. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: -hax Created 7 years, 9 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
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/extension_action_context_menu_browsertest.mm ('k') | no next file » | 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/extensions/extension_popup_controller.h" 5 #import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/browser/devtools/devtools_window.h" 9 #include "chrome/browser/devtools/devtools_window.h"
10 #include "chrome/browser/extensions/extension_host.h" 10 #include "chrome/browser/extensions/extension_host.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 - (void)showDevTools { 195 - (void)showDevTools {
196 DevToolsWindow::OpenDevToolsWindow(host_->render_view_host()); 196 DevToolsWindow::OpenDevToolsWindow(host_->render_view_host());
197 } 197 }
198 198
199 - (void)windowWillClose:(NSNotification *)notification { 199 - (void)windowWillClose:(NSNotification *)notification {
200 [super windowWillClose:notification]; 200 [super windowWillClose:notification];
201 gPopup = nil; 201 gPopup = nil;
202 if (host_->view()) 202 if (host_->view())
203 host_->view()->set_container(NULL); 203 host_->view()->set_container(NULL);
204 host_.reset();
204 } 205 }
205 206
206 - (void)windowDidResignKey:(NSNotification*)notification { 207 - (void)windowDidResignKey:(NSNotification*)notification {
207 if (!beingInspected_) 208 if (!beingInspected_)
208 [super windowDidResignKey:notification]; 209 [super windowDidResignKey:notification];
209 } 210 }
210 211
211 - (BOOL)isClosing { 212 - (BOOL)isClosing {
212 return [static_cast<InfoBubbleWindow*>([self window]) isClosing]; 213 return [static_cast<InfoBubbleWindow*>([self window]) isClosing];
213 } 214 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 return minSize; 373 return minSize;
373 } 374 }
374 375
375 // Private (TestingAPI) 376 // Private (TestingAPI)
376 + (NSSize)maxPopupSize { 377 + (NSSize)maxPopupSize {
377 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight}; 378 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight};
378 return maxSize; 379 return maxSize;
379 } 380 }
380 381
381 @end 382 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/extension_action_context_menu_browsertest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698