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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_window_cocoa.mm

Issue 8539025: Fix Panel to always detect when a tab is added. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test cleanup and fix Mac test hang 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 #include "chrome/browser/ui/panels/panel_browser_window_cocoa.h" 5 #include "chrome/browser/ui/panels/panel_browser_window_cocoa.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/tabs/tab_strip_model.h" 8 #include "chrome/browser/tabs/tab_strip_model.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 Browser* PanelBrowserWindowCocoa::GetPanelBrowser() const { 241 Browser* PanelBrowserWindowCocoa::GetPanelBrowser() const {
242 return browser(); 242 return browser();
243 } 243 }
244 244
245 void PanelBrowserWindowCocoa::DestroyPanelBrowser() { 245 void PanelBrowserWindowCocoa::DestroyPanelBrowser() {
246 [controller_ close]; 246 [controller_ close];
247 } 247 }
248 248
249 void PanelBrowserWindowCocoa::DidCloseNativeWindow() { 249 void PanelBrowserWindowCocoa::DidCloseNativeWindow() {
250 DCHECK(!isClosed()); 250 DCHECK(!isClosed());
251 panel_->manager()->Remove(panel_.get()); 251 panel_->OnNativePanelClosed();
252 controller_ = NULL; 252 controller_ = NULL;
253 } 253 }
254 254
255 gfx::Size PanelBrowserWindowCocoa::WindowSizeFromContentSize( 255 gfx::Size PanelBrowserWindowCocoa::WindowSizeFromContentSize(
256 const gfx::Size& content_size) const { 256 const gfx::Size& content_size) const {
257 NSWindow* window = [controller_ window]; 257 NSWindow* window = [controller_ window];
258 NSRect content = NSMakeRect(0, 0, 258 NSRect content = NSMakeRect(0, 0,
259 content_size.width(), content_size.height()); 259 content_size.width(), content_size.height());
260 NSRect frame = [window frameRectForContentRect:content]; 260 NSRect frame = [window frameRectForContentRect:content];
261 return gfx::Size(NSWidth(frame), NSHeight(frame)); 261 return gfx::Size(NSWidth(frame), NSHeight(frame));
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 return false; 349 return false;
350 } 350 }
351 351
352 bool NativePanelTestingCocoa::IsWindowSizeKnown() const { 352 bool NativePanelTestingCocoa::IsWindowSizeKnown() const {
353 return true; 353 return true;
354 } 354 }
355 355
356 bool NativePanelTestingCocoa::IsAnimatingBounds() const { 356 bool NativePanelTestingCocoa::IsAnimatingBounds() const {
357 return [native_panel_window_->controller_ isAnimatingBounds]; 357 return [native_panel_window_->controller_ isAnimatingBounds];
358 } 358 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_view_browsertest.cc ('k') | chrome/browser/ui/panels/panel_browser_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698