| 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 "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" |
| 6 | 6 |
| 7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2101 | 2101 |
| 2102 // ...and raise a tab with a sheet. | 2102 // ...and raise a tab with a sheet. |
| 2103 NSInteger index = [self modelIndexForContentsView:view]; | 2103 NSInteger index = [self modelIndexForContentsView:view]; |
| 2104 DCHECK(index >= 0); | 2104 DCHECK(index >= 0); |
| 2105 if (index >= 0) | 2105 if (index >= 0) |
| 2106 tabStripModel_->ActivateTabAt(index, false /* not a user gesture */); | 2106 tabStripModel_->ActivateTabAt(index, false /* not a user gesture */); |
| 2107 } | 2107 } |
| 2108 | 2108 |
| 2109 @end | 2109 @end |
| 2110 | 2110 |
| 2111 NSView* GetSheetParentViewForTabContents(TabContents* tab_contents) { | 2111 NSView* GetSheetParentViewForWebContents(WebContents* web_contents) { |
| 2112 // View hierarchy of the contents view: | 2112 // View hierarchy of the contents view: |
| 2113 // NSView -- switchView, same for all tabs | 2113 // NSView -- switchView, same for all tabs |
| 2114 // +- NSView -- TabContentsController's view | 2114 // +- NSView -- TabContentsController's view |
| 2115 // +- TabContentsViewCocoa | 2115 // +- TabContentsViewCocoa |
| 2116 // | 2116 // |
| 2117 // Changing it? Do not forget to modify | 2117 // Changing it? Do not forget to modify |
| 2118 // -[TabStripController swapInTabAtIndex:] too. | 2118 // -[TabStripController swapInTabAtIndex:] too. |
| 2119 return [tab_contents->web_contents()->GetNativeView() superview]; | 2119 return [web_contents->GetNativeView() superview]; |
| 2120 } | 2120 } |
| OLD | NEW |