| 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 #include "app/l10n_util_mac.h" |    5 #include "app/l10n_util_mac.h" | 
|    6 #include "base/mac_util.h" |    6 #include "base/mac_util.h" | 
|    7 #import "chrome/browser/browser_theme_provider.h" |    7 #import "chrome/browser/browser_theme_provider.h" | 
|    8 #import "chrome/browser/cocoa/menu_controller.h" |    8 #import "chrome/browser/cocoa/menu_controller.h" | 
|    9 #import "chrome/browser/cocoa/tab_controller.h" |    9 #import "chrome/browser/cocoa/tab_controller.h" | 
|   10 #import "chrome/browser/cocoa/tab_controller_target.h" |   10 #import "chrome/browser/cocoa/tab_controller_target.h" | 
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  307  |  307  | 
|  308 // Called by the tabs to determine whether we are in rapid (tab) closure mode. |  308 // Called by the tabs to determine whether we are in rapid (tab) closure mode. | 
|  309 - (BOOL)inRapidClosureMode { |  309 - (BOOL)inRapidClosureMode { | 
|  310   if ([[self target] respondsToSelector:@selector(inRapidClosureMode)]) { |  310   if ([[self target] respondsToSelector:@selector(inRapidClosureMode)]) { | 
|  311     return [[self target] performSelector:@selector(inRapidClosureMode)] ? |  311     return [[self target] performSelector:@selector(inRapidClosureMode)] ? | 
|  312         YES : NO; |  312         YES : NO; | 
|  313   } |  313   } | 
|  314   return NO; |  314   return NO; | 
|  315 } |  315 } | 
|  316  |  316  | 
 |  317 - (ViewID)viewID { | 
 |  318   NSInteger total = 0; | 
 |  319   NSInteger index = [[self target] indexForTabController:self inTotal:&total]; | 
 |  320   DCHECK(index >= 0 && index < total); | 
 |  321  | 
 |  322   if (index >= 0 && index <= (VIEW_ID_TAB_9 - VIEW_ID_TAB_0)) | 
 |  323     return static_cast<ViewID>(index + VIEW_ID_TAB_0); | 
 |  324   else if (index == total - 1) | 
 |  325     return VIEW_ID_TAB_LAST; | 
 |  326   return VIEW_ID_NONE; | 
 |  327 } | 
 |  328  | 
|  317 @end |  329 @end | 
| OLD | NEW |