| 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // the field when we navigated away from it, we should restore | 228 // the field when we navigated away from it, we should restore |
| 229 // that selection. | 229 // that selection. |
| 230 SetInitialFocus(); | 230 SetInitialFocus(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 focus_tracker_.reset(nil); | 233 focus_tracker_.reset(nil); |
| 234 } | 234 } |
| 235 | 235 |
| 236 void TabContentsViewMac::UpdatePreferredSize(const gfx::Size& pref_size) { | 236 void TabContentsViewMac::UpdatePreferredSize(const gfx::Size& pref_size) { |
| 237 preferred_width_ = pref_size.width(); | 237 preferred_width_ = pref_size.width(); |
| 238 if (tab_contents_->delegate()) |
| 239 tab_contents_->delegate()->UpdatePreferredSize(tab_contents_, pref_size); |
| 238 } | 240 } |
| 239 | 241 |
| 240 bool TabContentsViewMac::IsDoingDrag() const { | 242 bool TabContentsViewMac::IsDoingDrag() const { |
| 241 return false; | 243 return false; |
| 242 } | 244 } |
| 243 | 245 |
| 244 void TabContentsViewMac::CancelDragAndCloseTab() { | 246 void TabContentsViewMac::CancelDragAndCloseTab() { |
| 245 } | 247 } |
| 246 | 248 |
| 247 void TabContentsViewMac::UpdateDragCursor(WebDragOperation operation) { | 249 void TabContentsViewMac::UpdateDragCursor(WebDragOperation operation) { |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 [[[notification userInfo] objectForKey:kSelectionDirection] | 578 [[[notification userInfo] objectForKey:kSelectionDirection] |
| 577 unsignedIntegerValue]; | 579 unsignedIntegerValue]; |
| 578 if (direction == NSDirectSelection) | 580 if (direction == NSDirectSelection) |
| 579 return; | 581 return; |
| 580 | 582 |
| 581 [self tabContents]-> | 583 [self tabContents]-> |
| 582 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 584 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
| 583 } | 585 } |
| 584 | 586 |
| 585 @end | 587 @end |
| OLD | NEW |