| 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 "chrome/browser/ui/cocoa/tab_strip_controller.h" | 5 #import "chrome/browser/ui/cocoa/tab_strip_controller.h" |
| 6 | 6 |
| 7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "app/l10n_util.h" | 12 #include "app/l10n_util.h" |
| 13 #include "app/resource_bundle.h" | 13 #include "app/resource_bundle.h" |
| 14 #include "base/mac_util.h" | 14 #include "base/mac_util.h" |
| 15 #include "base/nsimage_cache_mac.h" | 15 #include "base/nsimage_cache_mac.h" |
| 16 #include "base/sys_string_conversions.h" | 16 #include "base/sys_string_conversions.h" |
| 17 #include "chrome/app/chrome_command_ids.h" | 17 #include "chrome/app/chrome_command_ids.h" |
| 18 #include "chrome/browser/metrics/user_metrics.h" | 18 #include "chrome/browser/metrics/user_metrics.h" |
| 19 #include "chrome/browser/profile.h" | 19 #include "chrome/browser/profile.h" |
| 20 #include "chrome/browser/debugger/devtools_window.h" | 20 #include "chrome/browser/debugger/devtools_window.h" |
| 21 #include "chrome/browser/net/url_fixer_upper.h" | 21 #include "chrome/browser/net/url_fixer_upper.h" |
| 22 #include "chrome/browser/sidebar/sidebar_container.h" | 22 #include "chrome/browser/sidebar/sidebar_container.h" |
| 23 #include "chrome/browser/sidebar/sidebar_manager.h" | 23 #include "chrome/browser/sidebar/sidebar_manager.h" |
| 24 #include "chrome/browser/tab_contents/navigation_controller.h" | 24 #include "chrome/browser/tab_contents/navigation_controller.h" |
| 25 #include "chrome/browser/tab_contents/navigation_entry.h" | 25 #include "chrome/browser/tab_contents/navigation_entry.h" |
| 26 #include "chrome/browser/tab_contents/tab_contents.h" | 26 #include "chrome/browser/tab_contents/tab_contents.h" |
| 27 #include "chrome/browser/tab_contents/tab_contents_view.h" | 27 #include "chrome/browser/tab_contents/tab_contents_view.h" |
| 28 #include "chrome/browser/tab_contents_wrapper.h" | |
| 29 #include "chrome/browser/tabs/tab_strip_model.h" | 28 #include "chrome/browser/tabs/tab_strip_model.h" |
| 30 #include "chrome/browser/ui/browser.h" | 29 #include "chrome/browser/ui/browser.h" |
| 31 #include "chrome/browser/ui/browser_navigator.h" | 30 #include "chrome/browser/ui/browser_navigator.h" |
| 32 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 31 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 33 #import "chrome/browser/ui/cocoa/constrained_window_mac.h" | 32 #import "chrome/browser/ui/cocoa/constrained_window_mac.h" |
| 34 #import "chrome/browser/ui/cocoa/new_tab_button.h" | 33 #import "chrome/browser/ui/cocoa/new_tab_button.h" |
| 35 #import "chrome/browser/ui/cocoa/tab_strip_view.h" | 34 #import "chrome/browser/ui/cocoa/tab_strip_view.h" |
| 36 #import "chrome/browser/ui/cocoa/tab_contents_controller.h" | 35 #import "chrome/browser/ui/cocoa/tab_contents_controller.h" |
| 37 #import "chrome/browser/ui/cocoa/tab_controller.h" | 36 #import "chrome/browser/ui/cocoa/tab_controller.h" |
| 38 #import "chrome/browser/ui/cocoa/tab_strip_model_observer_bridge.h" | 37 #import "chrome/browser/ui/cocoa/tab_strip_model_observer_bridge.h" |
| 39 #import "chrome/browser/ui/cocoa/tab_view.h" | 38 #import "chrome/browser/ui/cocoa/tab_view.h" |
| 40 #import "chrome/browser/ui/cocoa/throbber_view.h" | 39 #import "chrome/browser/ui/cocoa/throbber_view.h" |
| 41 #include "chrome/browser/ui/find_bar/find_bar.h" | 40 #include "chrome/browser/ui/find_bar/find_bar.h" |
| 42 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 41 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 42 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 43 #include "grit/app_resources.h" | 43 #include "grit/app_resources.h" |
| 44 #include "grit/generated_resources.h" | 44 #include "grit/generated_resources.h" |
| 45 #include "grit/theme_resources.h" | 45 #include "grit/theme_resources.h" |
| 46 #include "skia/ext/skia_utils_mac.h" | 46 #include "skia/ext/skia_utils_mac.h" |
| 47 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 47 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
| 48 | 48 |
| 49 NSString* const kTabStripNumberOfTabsChanged = @"kTabStripNumberOfTabsChanged"; | 49 NSString* const kTabStripNumberOfTabsChanged = @"kTabStripNumberOfTabsChanged"; |
| 50 | 50 |
| 51 namespace { | 51 namespace { |
| 52 | 52 |
| (...skipping 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1870 NSInteger index = [self indexFromModelIndex:modelIndex]; | 1870 NSInteger index = [self indexFromModelIndex:modelIndex]; |
| 1871 BrowserWindowController* controller = | 1871 BrowserWindowController* controller = |
| 1872 (BrowserWindowController*)[[switchView_ window] windowController]; | 1872 (BrowserWindowController*)[[switchView_ window] windowController]; |
| 1873 DCHECK(index >= 0); | 1873 DCHECK(index >= 0); |
| 1874 if (index >= 0) { | 1874 if (index >= 0) { |
| 1875 [controller setTab:[self viewAtIndex:index] isDraggable:YES]; | 1875 [controller setTab:[self viewAtIndex:index] isDraggable:YES]; |
| 1876 } | 1876 } |
| 1877 } | 1877 } |
| 1878 | 1878 |
| 1879 @end | 1879 @end |
| OLD | NEW |