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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // TODO(shess): If location-bar gets focus by default, this will | 227 // TODO(shess): If location-bar gets focus by default, this will |
228 // select-all in the field. If there was a specific selection in | 228 // select-all in the field. If there was a specific selection in |
229 // the field when we navigated away from it, we should restore | 229 // the field when we navigated away from it, we should restore |
230 // that selection. | 230 // that selection. |
231 SetInitialFocus(); | 231 SetInitialFocus(); |
232 } | 232 } |
233 | 233 |
234 focus_tracker_.reset(nil); | 234 focus_tracker_.reset(nil); |
235 } | 235 } |
236 | 236 |
237 void TabContentsViewMac::UpdatePreferredSize(const gfx::Size& pref_size) { | |
238 preferred_width_ = pref_size.width(); | |
239 } | |
240 | |
241 bool TabContentsViewMac::IsDoingDrag() const { | 237 bool TabContentsViewMac::IsDoingDrag() const { |
242 return false; | 238 return false; |
243 } | 239 } |
244 | 240 |
245 void TabContentsViewMac::CancelDragAndCloseTab() { | 241 void TabContentsViewMac::CancelDragAndCloseTab() { |
246 } | 242 } |
247 | 243 |
248 void TabContentsViewMac::UpdateDragCursor(WebDragOperation operation) { | 244 void TabContentsViewMac::UpdateDragCursor(WebDragOperation operation) { |
249 [cocoa_view_ setCurrentDragOperation: operation]; | 245 [cocoa_view_ setCurrentDragOperation: operation]; |
250 } | 246 } |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 [[[notification userInfo] objectForKey:kSelectionDirection] | 573 [[[notification userInfo] objectForKey:kSelectionDirection] |
578 unsignedIntegerValue]; | 574 unsignedIntegerValue]; |
579 if (direction == NSDirectSelection) | 575 if (direction == NSDirectSelection) |
580 return; | 576 return; |
581 | 577 |
582 [self tabContents]-> | 578 [self tabContents]-> |
583 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 579 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
584 } | 580 } |
585 | 581 |
586 @end | 582 @end |
OLD | NEW |