| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 [cocoa_view_ startDragWithDropData:drop_data | 182 [cocoa_view_ startDragWithDropData:drop_data |
| 183 dragOperationMask:mask | 183 dragOperationMask:mask |
| 184 image:gfx::SkBitmapToNSImage(image) | 184 image:gfx::SkBitmapToNSImage(image) |
| 185 offset:offset]; | 185 offset:offset]; |
| 186 } | 186 } |
| 187 | 187 |
| 188 void TabContentsViewMac::RenderViewCreated(RenderViewHost* host) { | 188 void TabContentsViewMac::RenderViewCreated(RenderViewHost* host) { |
| 189 // We want updates whenever the intrinsic width of the webpage changes. | 189 // We want updates whenever the intrinsic width of the webpage changes. |
| 190 // Put the RenderView into that mode. The preferred width is used for example | 190 // Put the RenderView into that mode. The preferred width is used for example |
| 191 // when the "zoom" button in the browser window is clicked. | 191 // when the "zoom" button in the browser window is clicked. |
| 192 host->EnablePreferredSizeMode(kPreferredSizeWidth); | 192 host->EnablePreferredSizeMode(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 void TabContentsViewMac::SetPageTitle(const string16& title) { | 195 void TabContentsViewMac::SetPageTitle(const string16& title) { |
| 196 // Meaningless on the Mac; widgets don't have a "title" attribute | 196 // Meaningless on the Mac; widgets don't have a "title" attribute |
| 197 } | 197 } |
| 198 | 198 |
| 199 void TabContentsViewMac::OnTabCrashed(base::TerminationStatus /* status */, | 199 void TabContentsViewMac::OnTabCrashed(base::TerminationStatus /* status */, |
| 200 int /* error_code */) { | 200 int /* error_code */) { |
| 201 } | 201 } |
| 202 | 202 |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 [[[notification userInfo] objectForKey:kSelectionDirection] | 606 [[[notification userInfo] objectForKey:kSelectionDirection] |
| 607 unsignedIntegerValue]; | 607 unsignedIntegerValue]; |
| 608 if (direction == NSDirectSelection) | 608 if (direction == NSDirectSelection) |
| 609 return; | 609 return; |
| 610 | 610 |
| 611 [self tabContents]-> | 611 [self tabContents]-> |
| 612 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 612 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
| 613 } | 613 } |
| 614 | 614 |
| 615 @end | 615 @end |
| OLD | NEW |