OLD | NEW |
---|---|
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" |
11 #include "chrome/browser/ui/panels/panel.h" | 11 #include "chrome/browser/ui/panels/panel.h" |
12 #include "chrome/browser/ui/panels/panel_manager.h" | 12 #include "chrome/browser/ui/panels/panel_manager.h" |
13 #include "chrome/browser/ui/panels/stacked_panel_collection.h" | 13 #include "chrome/browser/ui/panels/stacked_panel_collection.h" |
14 #include "ui/base/cocoa/window_size_constants.h" | 14 #include "ui/base/cocoa/window_size_constants.h" |
15 #include "ui/gfx/canvas.h" | 15 #include "ui/gfx/canvas.h" |
16 #include "ui/gfx/image/image.h" | 16 #include "ui/gfx/image/image.h" |
17 #include "ui/gfx/image/image_skia.h" | 17 #include "ui/gfx/image/image_skia.h" |
18 #include "ui/gfx/image/image_skia_rep.h" | 18 #include "ui/gfx/image/image_skia_rep.h" |
19 #include "ui/gfx/vector2d.h" | 19 #include "ui/gfx/geometry/vector2d.h" |
sky
2014/07/24 17:29:56
sort
| |
20 #include "ui/snapshot/snapshot.h" | 20 #include "ui/snapshot/snapshot.h" |
21 | 21 |
22 // The delegate class to receive the notification from NSViewAnimation. | 22 // The delegate class to receive the notification from NSViewAnimation. |
23 @interface BatchBoundsAnimationDelegate : NSObject<NSAnimationDelegate> { | 23 @interface BatchBoundsAnimationDelegate : NSObject<NSAnimationDelegate> { |
24 @private | 24 @private |
25 PanelStackWindowCocoa* window_; // Weak pointer. | 25 PanelStackWindowCocoa* window_; // Weak pointer. |
26 } | 26 } |
27 | 27 |
28 // Called when NSViewAnimation finishes the animation. | 28 // Called when NSViewAnimation finishes the animation. |
29 - (void)animationDidEnd:(NSAnimation*)animation; | 29 - (void)animationDidEnd:(NSAnimation*)animation; |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
376 [[NSWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater | 376 [[NSWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater |
377 styleMask:NSBorderlessWindowMask | 377 styleMask:NSBorderlessWindowMask |
378 backing:NSBackingStoreBuffered | 378 backing:NSBackingStoreBuffered |
379 defer:NO]); | 379 defer:NO]); |
380 [window_ setBackgroundColor:[NSColor clearColor]]; | 380 [window_ setBackgroundColor:[NSColor clearColor]]; |
381 [window_ setHasShadow:YES]; | 381 [window_ setHasShadow:YES]; |
382 [window_ setLevel:NSNormalWindowLevel]; | 382 [window_ setLevel:NSNormalWindowLevel]; |
383 [window_ orderFront:nil]; | 383 [window_ orderFront:nil]; |
384 [window_ setTitle:base::SysUTF16ToNSString(delegate_->GetTitle())]; | 384 [window_ setTitle:base::SysUTF16ToNSString(delegate_->GetTitle())]; |
385 } | 385 } |
OLD | NEW |