| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #import <Carbon/Carbon.h> | 5 #import <Carbon/Carbon.h> |
| 6 | 6 |
| 7 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" | 7 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 323 |
| 324 @implementation TabContentsViewCocoa | 324 @implementation TabContentsViewCocoa |
| 325 | 325 |
| 326 - (id)initWithTabContentsViewMac:(TabContentsViewMac*)w { | 326 - (id)initWithTabContentsViewMac:(TabContentsViewMac*)w { |
| 327 self = [super initWithFrame:NSZeroRect]; | 327 self = [super initWithFrame:NSZeroRect]; |
| 328 if (self != nil) { | 328 if (self != nil) { |
| 329 tabContentsView_ = w; | 329 tabContentsView_ = w; |
| 330 dropTarget_.reset( | 330 dropTarget_.reset( |
| 331 [[WebDropTarget alloc] initWithTabContents:[self tabContents]]); | 331 [[WebDropTarget alloc] initWithTabContents:[self tabContents]]); |
| 332 [self registerDragTypes]; | 332 [self registerDragTypes]; |
| 333 [self setViewID:VIEW_ID_TAB_CONTAINER]; |
| 333 } | 334 } |
| 334 return self; | 335 return self; |
| 335 } | 336 } |
| 336 | 337 |
| 337 - (void)dealloc { | 338 - (void)dealloc { |
| 338 // Cancel any deferred tab closes, just in case. | 339 // Cancel any deferred tab closes, just in case. |
| 339 [self cancelDeferredClose]; | 340 [self cancelDeferredClose]; |
| 340 | 341 |
| 341 // This probably isn't strictly necessary, but can't hurt. | 342 // This probably isn't strictly necessary, but can't hurt. |
| 342 [self unregisterDraggedTypes]; | 343 [self unregisterDraggedTypes]; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 [NSObject cancelPreviousPerformRequestsWithTarget:self | 459 [NSObject cancelPreviousPerformRequestsWithTarget:self |
| 459 selector:aSel | 460 selector:aSel |
| 460 object:nil]; | 461 object:nil]; |
| 461 } | 462 } |
| 462 | 463 |
| 463 - (void)closeTabAfterEvent { | 464 - (void)closeTabAfterEvent { |
| 464 tabContentsView_->CloseTab(); | 465 tabContentsView_->CloseTab(); |
| 465 } | 466 } |
| 466 | 467 |
| 467 @end | 468 @end |
| OLD | NEW |