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/cocoa/tab_strip_controller.h" | 5 #import "chrome/browser/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/browser.h" | 18 #include "chrome/browser/browser.h" |
19 #include "chrome/browser/browser_navigator.h" | |
20 #include "chrome/browser/find_bar.h" | 19 #include "chrome/browser/find_bar.h" |
21 #include "chrome/browser/find_bar_controller.h" | 20 #include "chrome/browser/find_bar_controller.h" |
22 #include "chrome/browser/metrics/user_metrics.h" | 21 #include "chrome/browser/metrics/user_metrics.h" |
23 #include "chrome/browser/profile.h" | 22 #include "chrome/browser/profile.h" |
24 #import "chrome/browser/cocoa/browser_window_controller.h" | 23 #import "chrome/browser/cocoa/browser_window_controller.h" |
25 #import "chrome/browser/cocoa/constrained_window_mac.h" | 24 #import "chrome/browser/cocoa/constrained_window_mac.h" |
26 #import "chrome/browser/cocoa/new_tab_button.h" | 25 #import "chrome/browser/cocoa/new_tab_button.h" |
27 #import "chrome/browser/cocoa/tab_strip_view.h" | 26 #import "chrome/browser/cocoa/tab_strip_view.h" |
28 #import "chrome/browser/cocoa/tab_contents_controller.h" | 27 #import "chrome/browser/cocoa/tab_contents_controller.h" |
29 #import "chrome/browser/cocoa/tab_controller.h" | 28 #import "chrome/browser/cocoa/tab_controller.h" |
30 #import "chrome/browser/cocoa/tab_strip_model_observer_bridge.h" | 29 #import "chrome/browser/cocoa/tab_strip_model_observer_bridge.h" |
31 #import "chrome/browser/cocoa/tab_view.h" | 30 #import "chrome/browser/cocoa/tab_view.h" |
32 #import "chrome/browser/cocoa/throbber_view.h" | 31 #import "chrome/browser/cocoa/throbber_view.h" |
33 #include "chrome/browser/debugger/devtools_window.h" | 32 #include "chrome/browser/debugger/devtools_window.h" |
34 #include "chrome/browser/net/url_fixer_upper.h" | 33 #include "chrome/browser/net/url_fixer_upper.h" |
35 #include "chrome/browser/sidebar/sidebar_container.h" | 34 #include "chrome/browser/sidebar/sidebar_container.h" |
36 #include "chrome/browser/sidebar/sidebar_manager.h" | 35 #include "chrome/browser/sidebar/sidebar_manager.h" |
37 #include "chrome/browser/tab_contents/navigation_controller.h" | 36 #include "chrome/browser/tab_contents/navigation_controller.h" |
38 #include "chrome/browser/tab_contents/navigation_entry.h" | 37 #include "chrome/browser/tab_contents/navigation_entry.h" |
39 #include "chrome/browser/tab_contents/tab_contents.h" | 38 #include "chrome/browser/tab_contents/tab_contents.h" |
40 #include "chrome/browser/tab_contents/tab_contents_view.h" | 39 #include "chrome/browser/tab_contents/tab_contents_view.h" |
41 #include "chrome/browser/tabs/tab_strip_model.h" | 40 #include "chrome/browser/tabs/tab_strip_model.h" |
| 41 #include "chrome/browser/ui/browser_navigator.h" |
42 #include "grit/app_resources.h" | 42 #include "grit/app_resources.h" |
43 #include "grit/generated_resources.h" | 43 #include "grit/generated_resources.h" |
44 #include "grit/theme_resources.h" | 44 #include "grit/theme_resources.h" |
45 #include "skia/ext/skia_utils_mac.h" | 45 #include "skia/ext/skia_utils_mac.h" |
46 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 46 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
47 | 47 |
48 NSString* const kTabStripNumberOfTabsChanged = @"kTabStripNumberOfTabsChanged"; | 48 NSString* const kTabStripNumberOfTabsChanged = @"kTabStripNumberOfTabsChanged"; |
49 | 49 |
50 namespace { | 50 namespace { |
51 | 51 |
(...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1849 NSInteger index = [self indexFromModelIndex:modelIndex]; | 1849 NSInteger index = [self indexFromModelIndex:modelIndex]; |
1850 BrowserWindowController* controller = | 1850 BrowserWindowController* controller = |
1851 (BrowserWindowController*)[[switchView_ window] windowController]; | 1851 (BrowserWindowController*)[[switchView_ window] windowController]; |
1852 DCHECK(index >= 0); | 1852 DCHECK(index >= 0); |
1853 if (index >= 0) { | 1853 if (index >= 0) { |
1854 [controller setTab:[self viewAtIndex:index] isDraggable:YES]; | 1854 [controller setTab:[self viewAtIndex:index] isDraggable:YES]; |
1855 } | 1855 } |
1856 } | 1856 } |
1857 | 1857 |
1858 @end | 1858 @end |
OLD | NEW |