OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 167 } |
168 | 168 |
169 void TabContentsViewMac::RenderViewCreated(RenderViewHost* host) { | 169 void TabContentsViewMac::RenderViewCreated(RenderViewHost* host) { |
170 // We want updates whenever the intrinsic width of the webpage changes. | 170 // We want updates whenever the intrinsic width of the webpage changes. |
171 // Put the RenderView into that mode. The preferred width is used for example | 171 // Put the RenderView into that mode. The preferred width is used for example |
172 // when the "zoom" button in the browser window is clicked. | 172 // when the "zoom" button in the browser window is clicked. |
173 host->Send(new ViewMsg_EnablePreferredSizeChangedMode( | 173 host->Send(new ViewMsg_EnablePreferredSizeChangedMode( |
174 host->routing_id(), kPreferredSizeWidth)); | 174 host->routing_id(), kPreferredSizeWidth)); |
175 } | 175 } |
176 | 176 |
177 void TabContentsViewMac::SetPageTitle(const std::wstring& title) { | 177 void TabContentsViewMac::SetPageTitle(const string16& title) { |
178 // Meaningless on the Mac; widgets don't have a "title" attribute | 178 // Meaningless on the Mac; widgets don't have a "title" attribute |
179 } | 179 } |
180 | 180 |
181 void TabContentsViewMac::OnTabCrashed(base::TerminationStatus /* status */, | 181 void TabContentsViewMac::OnTabCrashed(base::TerminationStatus /* status */, |
182 int /* error_code */) { | 182 int /* error_code */) { |
183 if (!sad_tab_.get()) { | 183 if (!sad_tab_.get()) { |
184 DCHECK(tab_contents_); | 184 DCHECK(tab_contents_); |
185 if (tab_contents_) { | 185 if (tab_contents_) { |
186 SadTabController* sad_tab = | 186 SadTabController* sad_tab = |
187 [[SadTabController alloc] initWithTabContents:tab_contents_ | 187 [[SadTabController alloc] initWithTabContents:tab_contents_ |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 [[[notification userInfo] objectForKey:kSelectionDirection] | 573 [[[notification userInfo] objectForKey:kSelectionDirection] |
574 unsignedIntegerValue]; | 574 unsignedIntegerValue]; |
575 if (direction == NSDirectSelection) | 575 if (direction == NSDirectSelection) |
576 return; | 576 return; |
577 | 577 |
578 [self tabContents]-> | 578 [self tabContents]-> |
579 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 579 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
580 } | 580 } |
581 | 581 |
582 @end | 582 @end |
OLD | NEW |