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

Side by Side Diff: chrome/browser/ui/cocoa/panels/panel_stack_window_cocoa.mm

Issue 143453008: [Mac] Remove a panel from stack window bounds update list when it is being removed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/cocoa/panels/panel_stack_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/panels/panel_stack_window_cocoa.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #import "chrome/browser/ui/cocoa/panels/panel_cocoa.h" 9 #import "chrome/browser/ui/cocoa/panels/panel_cocoa.h"
10 #import "chrome/browser/ui/cocoa/panels/panel_utils_cocoa.h" 10 #import "chrome/browser/ui/cocoa/panels/panel_utils_cocoa.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 EnsureWindowCreated(); 75 EnsureWindowCreated();
76 76
77 // Make the stack window own the panel window such that all panels window 77 // Make the stack window own the panel window such that all panels window
78 // could be moved simulatenously when the stack window is moved. 78 // could be moved simulatenously when the stack window is moved.
79 [window_ addChildWindow:panel->GetNativeWindow() ordered:NSWindowAbove]; 79 [window_ addChildWindow:panel->GetNativeWindow() ordered:NSWindowAbove];
80 80
81 UpdateStackWindowBounds(); 81 UpdateStackWindowBounds();
82 } 82 }
83 83
84 void PanelStackWindowCocoa::RemovePanel(Panel* panel) { 84 void PanelStackWindowCocoa::RemovePanel(Panel* panel) {
85 if (IsAnimatingPanelBounds()) {
86 // This panel is gone. We should not perform any update to it.
87 bounds_updates_.erase(panel);
88 }
89
85 panels_.remove(panel); 90 panels_.remove(panel);
86 91
87 // If the native panel is closed, the native window should already be gone. 92 // If the native panel is closed, the native window should already be gone.
88 if (!static_cast<PanelCocoa*>(panel->native_panel())->IsClosed()) 93 if (!static_cast<PanelCocoa*>(panel->native_panel())->IsClosed())
89 [window_ removeChildWindow:panel->GetNativeWindow()]; 94 [window_ removeChildWindow:panel->GetNativeWindow()];
90 95
91 UpdateStackWindowBounds(); 96 UpdateStackWindowBounds();
92 } 97 }
93 98
94 void PanelStackWindowCocoa::MergeWith(NativePanelStackWindow* another) { 99 void PanelStackWindowCocoa::MergeWith(NativePanelStackWindow* another) {
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 [[NSWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater 376 [[NSWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
372 styleMask:NSBorderlessWindowMask 377 styleMask:NSBorderlessWindowMask
373 backing:NSBackingStoreBuffered 378 backing:NSBackingStoreBuffered
374 defer:NO]); 379 defer:NO]);
375 [window_ setBackgroundColor:[NSColor clearColor]]; 380 [window_ setBackgroundColor:[NSColor clearColor]];
376 [window_ setHasShadow:YES]; 381 [window_ setHasShadow:YES];
377 [window_ setLevel:NSNormalWindowLevel]; 382 [window_ setLevel:NSNormalWindowLevel];
378 [window_ orderFront:nil]; 383 [window_ orderFront:nil];
379 [window_ setTitle:base::SysUTF16ToNSString(delegate_->GetTitle())]; 384 [window_ setTitle:base::SysUTF16ToNSString(delegate_->GetTitle())];
380 } 385 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698