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

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

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 6 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
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 break; 219 break;
220 } 220 }
221 } 221 }
222 } else { 222 } else {
223 need_to_animate_individual_panels = true; 223 need_to_animate_individual_panels = true;
224 } 224 }
225 225
226 int num_of_animations = 1; 226 int num_of_animations = 1;
227 if (need_to_animate_individual_panels) 227 if (need_to_animate_individual_panels)
228 num_of_animations += bounds_updates_.size(); 228 num_of_animations += bounds_updates_.size();
229 scoped_nsobject<NSMutableArray> animations( 229 base::scoped_nsobject<NSMutableArray> animations(
230 [[NSMutableArray alloc] initWithCapacity:num_of_animations]); 230 [[NSMutableArray alloc] initWithCapacity:num_of_animations]);
231 231
232 // Add the animation for each panel in the update list. 232 // Add the animation for each panel in the update list.
233 if (need_to_animate_individual_panels) { 233 if (need_to_animate_individual_panels) {
234 for (BoundsUpdates::const_iterator iter = bounds_updates_.begin(); 234 for (BoundsUpdates::const_iterator iter = bounds_updates_.begin();
235 iter != bounds_updates_.end(); ++iter) { 235 iter != bounds_updates_.end(); ++iter) {
236 Panel* panel = iter->first; 236 Panel* panel = iter->first;
237 NSRect panel_frame = 237 NSRect panel_frame =
238 cocoa_utils::ConvertRectToCocoaCoordinates(panel->GetBounds()); 238 cocoa_utils::ConvertRectToCocoaCoordinates(panel->GetBounds());
239 NSDictionary* animation = [NSDictionary dictionaryWithObjectsAndKeys: 239 NSDictionary* animation = [NSDictionary dictionaryWithObjectsAndKeys:
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 [[NSWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater 372 [[NSWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
373 styleMask:NSBorderlessWindowMask 373 styleMask:NSBorderlessWindowMask
374 backing:NSBackingStoreBuffered 374 backing:NSBackingStoreBuffered
375 defer:NO]); 375 defer:NO]);
376 [window_ setBackgroundColor:[NSColor clearColor]]; 376 [window_ setBackgroundColor:[NSColor clearColor]];
377 [window_ setHasShadow:YES]; 377 [window_ setHasShadow:YES];
378 [window_ setLevel:NSNormalWindowLevel]; 378 [window_ setLevel:NSNormalWindowLevel];
379 [window_ orderFront:nil]; 379 [window_ orderFront:nil];
380 [window_ setTitle:base::SysUTF16ToNSString(delegate_->GetTitle())]; 380 [window_ setTitle:base::SysUTF16ToNSString(delegate_->GetTitle())];
381 } 381 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698