OLD | NEW |
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 #include "chrome/browser/ui/panels/panel_window_controller_cocoa.h" | 5 #include "chrome/browser/ui/panels/panel_window_controller_cocoa.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 407 |
408 @implementation PanelWindowControllerCocoa | 408 @implementation PanelWindowControllerCocoa |
409 | 409 |
410 - (id)initWithBrowserWindow:(PanelBrowserWindowCocoa*)window { | 410 - (id)initWithBrowserWindow:(PanelBrowserWindowCocoa*)window { |
411 NSString* nibpath = | 411 NSString* nibpath = |
412 [base::mac::FrameworkBundle() pathForResource:@"Panel" ofType:@"nib"]; | 412 [base::mac::FrameworkBundle() pathForResource:@"Panel" ofType:@"nib"]; |
413 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { | 413 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { |
414 windowShim_.reset(window); | 414 windowShim_.reset(window); |
415 animateOnBoundsChange_ = YES; | 415 animateOnBoundsChange_ = YES; |
416 canBecomeKeyWindow_ = YES; | 416 canBecomeKeyWindow_ = YES; |
| 417 contentsController_.reset( |
| 418 [[TabContentsController alloc] initWithContents:nil]); |
417 } | 419 } |
418 contentsController_.reset( | |
419 [[TabContentsController alloc] initWithContents:nil]); | |
420 return self; | 420 return self; |
421 } | 421 } |
422 | 422 |
423 - (void)dealloc { | 423 - (void)dealloc { |
424 if (windowTrackingArea_.get()) { | 424 if (windowTrackingArea_.get()) { |
425 [[[[self window] contentView] superview] | 425 [[[[self window] contentView] superview] |
426 removeTrackingArea:windowTrackingArea_.get()]; | 426 removeTrackingArea:windowTrackingArea_.get()]; |
427 } | 427 } |
428 [super dealloc]; | 428 [super dealloc]; |
429 } | 429 } |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 if (![self isWindowLoaded]) | 1060 if (![self isWindowLoaded]) |
1061 return; | 1061 return; |
1062 [[self window] invalidateCursorRectsForView:overlayView_]; | 1062 [[self window] invalidateCursorRectsForView:overlayView_]; |
1063 } | 1063 } |
1064 | 1064 |
1065 - (BOOL)isActivationByClickingTitlebarEnabled { | 1065 - (BOOL)isActivationByClickingTitlebarEnabled { |
1066 return !windowShim_->panel()->always_on_top(); | 1066 return !windowShim_->panel()->always_on_top(); |
1067 } | 1067 } |
1068 | 1068 |
1069 @end | 1069 @end |
OLD | NEW |