| 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 #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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   62 @end |   62 @end | 
|   63  |   63  | 
|   64 namespace tab_contents_view_mac { |   64 namespace tab_contents_view_mac { | 
|   65 TabContentsView* CreateTabContentsView(TabContents* tab_contents) { |   65 TabContentsView* CreateTabContentsView(TabContents* tab_contents) { | 
|   66   return new TabContentsViewMac(tab_contents); |   66   return new TabContentsViewMac(tab_contents); | 
|   67 } |   67 } | 
|   68 } |   68 } | 
|   69  |   69  | 
|   70 TabContentsViewMac::TabContentsViewMac(TabContents* tab_contents) |   70 TabContentsViewMac::TabContentsViewMac(TabContents* tab_contents) | 
|   71     : tab_contents_(tab_contents), |   71     : tab_contents_(tab_contents), | 
|   72       preferred_width_(0), |  | 
|   73       overlaid_view_(nil) { |   72       overlaid_view_(nil) { | 
|   74 } |   73 } | 
|   75  |   74  | 
|   76 TabContentsViewMac::~TabContentsViewMac() { |   75 TabContentsViewMac::~TabContentsViewMac() { | 
|   77   // This handles the case where a renderer close call was deferred |   76   // This handles the case where a renderer close call was deferred | 
|   78   // while the user was operating a UI control which resulted in a |   77   // while the user was operating a UI control which resulted in a | 
|   79   // close.  In that case, the Cocoa view outlives the |   78   // close.  In that case, the Cocoa view outlives the | 
|   80   // TabContentsViewMac instance due to Cocoa retain count. |   79   // TabContentsViewMac instance due to Cocoa retain count. | 
|   81   [cocoa_view_ cancelDeferredClose]; |   80   [cocoa_view_ cancelDeferredClose]; | 
|   82   [cocoa_view_ clearTabContentsView]; |   81   [cocoa_view_ clearTabContentsView]; | 
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  612       [[[notification userInfo] objectForKey:kSelectionDirection] |  611       [[[notification userInfo] objectForKey:kSelectionDirection] | 
|  613         unsignedIntegerValue]; |  612         unsignedIntegerValue]; | 
|  614   if (direction == NSDirectSelection) |  613   if (direction == NSDirectSelection) | 
|  615     return; |  614     return; | 
|  616  |  615  | 
|  617   [self tabContents]-> |  616   [self tabContents]-> | 
|  618       FocusThroughTabTraversal(direction == NSSelectingPrevious); |  617       FocusThroughTabTraversal(direction == NSSelectingPrevious); | 
|  619 } |  618 } | 
|  620  |  619  | 
|  621 @end |  620 @end | 
| OLD | NEW |