Chromium Code Reviews| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 315 // The obvious way to do this would be PostNonNestableTask(), but that | 315 // The obvious way to do this would be PostNonNestableTask(), but that |
| 316 // will fire when the event-tracking loop polls for events. So we | 316 // will fire when the event-tracking loop polls for events. So we |
| 317 // need to bounce the message via Cocoa, instead. | 317 // need to bounce the message via Cocoa, instead. |
| 318 void TabContentsViewMac::CloseTabAfterEventTracking() { | 318 void TabContentsViewMac::CloseTabAfterEventTracking() { |
| 319 [cocoa_view_ cancelDeferredClose]; | 319 [cocoa_view_ cancelDeferredClose]; |
| 320 [cocoa_view_ performSelector:@selector(closeTabAfterEvent) | 320 [cocoa_view_ performSelector:@selector(closeTabAfterEvent) |
| 321 withObject:nil | 321 withObject:nil |
| 322 afterDelay:0.0]; | 322 afterDelay:0.0]; |
| 323 } | 323 } |
| 324 | 324 |
| 325 void TabContentsViewMac::GetViewBounds(gfx::Rect* out) const { | |
| 326 NOTIMPLEMENTED(); | |
|
sky
2011/01/19 01:43:38
Add a comment that this isn't used on mac.
varunjain
2011/01/19 01:50:44
Done.
| |
| 327 } | |
| 328 | |
| 325 void TabContentsViewMac::CloseTab() { | 329 void TabContentsViewMac::CloseTab() { |
| 326 tab_contents()->Close(tab_contents()->render_view_host()); | 330 tab_contents()->Close(tab_contents()->render_view_host()); |
| 327 } | 331 } |
| 328 | 332 |
| 329 void TabContentsViewMac::Observe(NotificationType type, | 333 void TabContentsViewMac::Observe(NotificationType type, |
| 330 const NotificationSource& source, | 334 const NotificationSource& source, |
| 331 const NotificationDetails& details) { | 335 const NotificationDetails& details) { |
| 332 switch (type.value) { | 336 switch (type.value) { |
| 333 case NotificationType::TAB_CONTENTS_CONNECTED: { | 337 case NotificationType::TAB_CONTENTS_CONNECTED: { |
| 334 sad_tab_.reset(); | 338 sad_tab_.reset(); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 506 [[[notification userInfo] objectForKey:kSelectionDirection] | 510 [[[notification userInfo] objectForKey:kSelectionDirection] |
| 507 unsignedIntegerValue]; | 511 unsignedIntegerValue]; |
| 508 if (direction == NSDirectSelection) | 512 if (direction == NSDirectSelection) |
| 509 return; | 513 return; |
| 510 | 514 |
| 511 [self tabContents]-> | 515 [self tabContents]-> |
| 512 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 516 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
| 513 } | 517 } |
| 514 | 518 |
| 515 @end | 519 @end |
| OLD | NEW |