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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 switch (type.value) { | 330 switch (type.value) { |
331 case NotificationType::TAB_CONTENTS_CONNECTED: { | 331 case NotificationType::TAB_CONTENTS_CONNECTED: { |
332 sad_tab_.reset(); | 332 sad_tab_.reset(); |
333 break; | 333 break; |
334 } | 334 } |
335 default: | 335 default: |
336 NOTREACHED() << "Got a notification we didn't register for."; | 336 NOTREACHED() << "Got a notification we didn't register for."; |
337 } | 337 } |
338 } | 338 } |
339 | 339 |
340 @interface NSApplication(SPI) | |
341 - (void)_cycleWindowsReversed:(BOOL)reversed; | |
342 @end | |
343 | |
344 @implementation TabContentsViewCocoa | 340 @implementation TabContentsViewCocoa |
345 | 341 |
346 - (id)initWithTabContentsViewMac:(TabContentsViewMac*)w { | 342 - (id)initWithTabContentsViewMac:(TabContentsViewMac*)w { |
347 self = [super initWithFrame:NSZeroRect]; | 343 self = [super initWithFrame:NSZeroRect]; |
348 if (self != nil) { | 344 if (self != nil) { |
349 tabContentsView_ = w; | 345 tabContentsView_ = w; |
350 dropTarget_.reset( | 346 dropTarget_.reset( |
351 [[WebDropTarget alloc] initWithTabContents:[self tabContents]]); | 347 [[WebDropTarget alloc] initWithTabContents:[self tabContents]]); |
352 [self registerDragTypes]; | 348 [self registerDragTypes]; |
353 // TabContentsViewCocoa's ViewID may be changed to VIEW_ID_DEV_TOOLS_DOCKED | 349 // TabContentsViewCocoa's ViewID may be changed to VIEW_ID_DEV_TOOLS_DOCKED |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 [[[notification userInfo] objectForKey:kSelectionDirection] | 504 [[[notification userInfo] objectForKey:kSelectionDirection] |
509 unsignedIntegerValue]; | 505 unsignedIntegerValue]; |
510 if (direction == NSDirectSelection) | 506 if (direction == NSDirectSelection) |
511 return; | 507 return; |
512 | 508 |
513 [self tabContents]-> | 509 [self tabContents]-> |
514 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 510 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
515 } | 511 } |
516 | 512 |
517 @end | 513 @end |
OLD | NEW |