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 // This method is noth currently used on mac. |
| 327 NOTIMPLEMENTED(); |
| 328 } |
| 329 |
325 void TabContentsViewMac::CloseTab() { | 330 void TabContentsViewMac::CloseTab() { |
326 tab_contents()->Close(tab_contents()->render_view_host()); | 331 tab_contents()->Close(tab_contents()->render_view_host()); |
327 } | 332 } |
328 | 333 |
329 void TabContentsViewMac::Observe(NotificationType type, | 334 void TabContentsViewMac::Observe(NotificationType type, |
330 const NotificationSource& source, | 335 const NotificationSource& source, |
331 const NotificationDetails& details) { | 336 const NotificationDetails& details) { |
332 switch (type.value) { | 337 switch (type.value) { |
333 case NotificationType::TAB_CONTENTS_CONNECTED: { | 338 case NotificationType::TAB_CONTENTS_CONNECTED: { |
334 sad_tab_.reset(); | 339 sad_tab_.reset(); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 [[[notification userInfo] objectForKey:kSelectionDirection] | 511 [[[notification userInfo] objectForKey:kSelectionDirection] |
507 unsignedIntegerValue]; | 512 unsignedIntegerValue]; |
508 if (direction == NSDirectSelection) | 513 if (direction == NSDirectSelection) |
509 return; | 514 return; |
510 | 515 |
511 [self tabContents]-> | 516 [self tabContents]-> |
512 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 517 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
513 } | 518 } |
514 | 519 |
515 @end | 520 @end |
OLD | NEW |