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 #include <QuartzCore/QuartzCore.h> | 5 #include <QuartzCore/QuartzCore.h> |
6 | 6 |
7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" | 7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" |
8 | 8 |
9 #include "chrome/browser/chrome_thread.h" | 9 #include "chrome/browser/chrome_thread.h" |
10 #include "app/surface/io_surface_support_mac.h" | 10 #include "app/surface/io_surface_support_mac.h" |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 } | 662 } |
663 } else { | 663 } else { |
664 [cocoa_view_ setNeedsDisplayInRect:ns_rect]; | 664 [cocoa_view_ setNeedsDisplayInRect:ns_rect]; |
665 } | 665 } |
666 } | 666 } |
667 | 667 |
668 if (!about_to_validate_and_paint_) | 668 if (!about_to_validate_and_paint_) |
669 [cocoa_view_ displayIfNeeded]; | 669 [cocoa_view_ displayIfNeeded]; |
670 } | 670 } |
671 | 671 |
672 void RenderWidgetHostViewMac::RenderViewGone() { | 672 void RenderWidgetHostViewMac::RenderViewGone(base::TerminationStatus status, |
| 673 int error_code) { |
673 // TODO(darin): keep this around, and draw sad-tab into it. | 674 // TODO(darin): keep this around, and draw sad-tab into it. |
674 UpdateCursorIfOverSelf(); | 675 UpdateCursorIfOverSelf(); |
675 Destroy(); | 676 Destroy(); |
676 } | 677 } |
677 | 678 |
678 void RenderWidgetHostViewMac::Destroy() { | 679 void RenderWidgetHostViewMac::Destroy() { |
679 // On Windows, popups are implemented with a popup window style, so that when | 680 // On Windows, popups are implemented with a popup window style, so that when |
680 // an event comes in that would "cancel" it, it receives the OnCancelMode | 681 // an event comes in that would "cancel" it, it receives the OnCancelMode |
681 // message and can kill itself. Alas, on the Mac, views cannot capture events | 682 // message and can kill itself. Alas, on the Mac, views cannot capture events |
682 // outside of themselves. On Windows, if Destroy is being called on a view, | 683 // outside of themselves. On Windows, if Destroy is being called on a view, |
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2447 if (!string) return NO; | 2448 if (!string) return NO; |
2448 | 2449 |
2449 // If the user is currently using an IME, confirm the IME input, | 2450 // If the user is currently using an IME, confirm the IME input, |
2450 // and then insert the text from the service, the same as TextEdit and Safari. | 2451 // and then insert the text from the service, the same as TextEdit and Safari. |
2451 [self confirmComposition]; | 2452 [self confirmComposition]; |
2452 [self insertText:string]; | 2453 [self insertText:string]; |
2453 return YES; | 2454 return YES; |
2454 } | 2455 } |
2455 | 2456 |
2456 @end | 2457 @end |
OLD | NEW |