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 <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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // We want updates whenever the intrinsic width of the webpage changes. | 168 // We want updates whenever the intrinsic width of the webpage changes. |
169 // Put the RenderView into that mode. The preferred width is used for example | 169 // Put the RenderView into that mode. The preferred width is used for example |
170 // when the "zoom" button in the browser window is clicked. | 170 // when the "zoom" button in the browser window is clicked. |
171 host->EnablePreferredSizeChangedMode(kPreferredSizeWidth); | 171 host->EnablePreferredSizeChangedMode(kPreferredSizeWidth); |
172 } | 172 } |
173 | 173 |
174 void TabContentsViewMac::SetPageTitle(const std::wstring& title) { | 174 void TabContentsViewMac::SetPageTitle(const std::wstring& title) { |
175 // Meaningless on the Mac; widgets don't have a "title" attribute | 175 // Meaningless on the Mac; widgets don't have a "title" attribute |
176 } | 176 } |
177 | 177 |
178 void TabContentsViewMac::OnTabCrashed() { | 178 void TabContentsViewMac::OnTabCrashed(base::TerminationStatus /* status */, |
| 179 int /* error_code */) { |
179 if (!sad_tab_.get()) { | 180 if (!sad_tab_.get()) { |
180 TabContents* contents = tab_contents(); | 181 TabContents* contents = tab_contents(); |
181 DCHECK(contents); | 182 DCHECK(contents); |
182 if (contents) { | 183 if (contents) { |
183 SadTabController* sad_tab = | 184 SadTabController* sad_tab = |
184 [[SadTabController alloc] initWithTabContents:contents | 185 [[SadTabController alloc] initWithTabContents:contents |
185 superview:cocoa_view_]; | 186 superview:cocoa_view_]; |
186 sad_tab_.reset(sad_tab); | 187 sad_tab_.reset(sad_tab); |
187 } | 188 } |
188 } | 189 } |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 [[[notification userInfo] objectForKey:kSelectionDirection] | 506 [[[notification userInfo] objectForKey:kSelectionDirection] |
506 unsignedIntegerValue]; | 507 unsignedIntegerValue]; |
507 if (direction == NSDirectSelection) | 508 if (direction == NSDirectSelection) |
508 return; | 509 return; |
509 | 510 |
510 [self tabContents]-> | 511 [self tabContents]-> |
511 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 512 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
512 } | 513 } |
513 | 514 |
514 @end | 515 @end |
OLD | NEW |