| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #import "content/browser/web_contents/web_contents_view_mac.h" | 7 #import "content/browser/web_contents/web_contents_view_mac.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 } | 329 } |
| 330 | 330 |
| 331 | 331 |
| 332 void WebContentsViewMac::RenderViewCreated(RenderViewHost* host) { | 332 void WebContentsViewMac::RenderViewCreated(RenderViewHost* host) { |
| 333 // We want updates whenever the intrinsic width of the webpage changes. | 333 // We want updates whenever the intrinsic width of the webpage changes. |
| 334 // Put the RenderView into that mode. The preferred width is used for example | 334 // Put the RenderView into that mode. The preferred width is used for example |
| 335 // when the "zoom" button in the browser window is clicked. | 335 // when the "zoom" button in the browser window is clicked. |
| 336 host->EnablePreferredSizeMode(); | 336 host->EnablePreferredSizeMode(); |
| 337 } | 337 } |
| 338 | 338 |
| 339 void WebContentsViewMac::RenderViewSwappedIn(RenderViewHost* host) { | 339 void WebContentsViewMac::RenderViewSwappedIn(RenderViewHost* new_host, |
| 340 RenderViewHost* old_host) { |
| 340 } | 341 } |
| 341 | 342 |
| 342 bool WebContentsViewMac::IsEventTracking() const { | 343 bool WebContentsViewMac::IsEventTracking() const { |
| 343 return base::MessagePumpMac::IsHandlingSendEvent(); | 344 return base::MessagePumpMac::IsHandlingSendEvent(); |
| 344 } | 345 } |
| 345 | 346 |
| 346 // Arrange to call CloseTab() after we're back to the main event loop. | 347 // Arrange to call CloseTab() after we're back to the main event loop. |
| 347 // The obvious way to do this would be PostNonNestableTask(), but that | 348 // The obvious way to do this would be PostNonNestableTask(), but that |
| 348 // will fire when the event-tracking loop polls for events. So we | 349 // will fire when the event-tracking loop polls for events. So we |
| 349 // need to bounce the message via Cocoa, instead. | 350 // need to bounce the message via Cocoa, instead. |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 [[[notification userInfo] objectForKey:kSelectionDirection] | 557 [[[notification userInfo] objectForKey:kSelectionDirection] |
| 557 unsignedIntegerValue]; | 558 unsignedIntegerValue]; |
| 558 if (direction == NSDirectSelection) | 559 if (direction == NSDirectSelection) |
| 559 return; | 560 return; |
| 560 | 561 |
| 561 [self webContents]-> | 562 [self webContents]-> |
| 562 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 563 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
| 563 } | 564 } |
| 564 | 565 |
| 565 @end | 566 @end |
| OLD | NEW |