| 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 "app/app_switches.h" | 9 #include "app/app_switches.h" |
| 10 #include "app/surface/io_surface_support_mac.h" | 10 #include "app/surface/io_surface_support_mac.h" |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 } | 787 } |
| 788 | 788 |
| 789 // If |about_to_validate_and_paint_| is set, then -drawRect: is on the stack | 789 // If |about_to_validate_and_paint_| is set, then -drawRect: is on the stack |
| 790 // and it's not allowed to call -setHidden on the accelerated view. In that | 790 // and it's not allowed to call -setHidden on the accelerated view. In that |
| 791 // case, -callSetNeedsDisplayInRect: will hide it later. | 791 // case, -callSetNeedsDisplayInRect: will hide it later. |
| 792 // If |about_to_validate_and_paint_| is not set, do it now. | 792 // If |about_to_validate_and_paint_| is not set, do it now. |
| 793 if (!about_to_validate_and_paint_) | 793 if (!about_to_validate_and_paint_) |
| 794 HandleDelayedGpuViewHiding(); | 794 HandleDelayedGpuViewHiding(); |
| 795 } | 795 } |
| 796 | 796 |
| 797 void RenderWidgetHostViewMac::RenderViewGone() { | 797 void RenderWidgetHostViewMac::RenderViewGone(base::TerminationStatus status, |
| 798 int error_code) { |
| 798 // TODO(darin): keep this around, and draw sad-tab into it. | 799 // TODO(darin): keep this around, and draw sad-tab into it. |
| 799 UpdateCursorIfOverSelf(); | 800 UpdateCursorIfOverSelf(); |
| 800 Destroy(); | 801 Destroy(); |
| 801 } | 802 } |
| 802 | 803 |
| 803 void RenderWidgetHostViewMac::Destroy() { | 804 void RenderWidgetHostViewMac::Destroy() { |
| 804 // On Windows, popups are implemented with a popup window style, so that when | 805 // On Windows, popups are implemented with a popup window style, so that when |
| 805 // an event comes in that would "cancel" it, it receives the OnCancelMode | 806 // an event comes in that would "cancel" it, it receives the OnCancelMode |
| 806 // message and can kill itself. Alas, on the Mac, views cannot capture events | 807 // message and can kill itself. Alas, on the Mac, views cannot capture events |
| 807 // outside of themselves. On Windows, if Destroy is being called on a view, | 808 // outside of themselves. On Windows, if Destroy is being called on a view, |
| (...skipping 1870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2678 if (!string) return NO; | 2679 if (!string) return NO; |
| 2679 | 2680 |
| 2680 // If the user is currently using an IME, confirm the IME input, | 2681 // If the user is currently using an IME, confirm the IME input, |
| 2681 // and then insert the text from the service, the same as TextEdit and Safari. | 2682 // and then insert the text from the service, the same as TextEdit and Safari. |
| 2682 [self confirmComposition]; | 2683 [self confirmComposition]; |
| 2683 [self insertText:string]; | 2684 [self insertText:string]; |
| 2684 return YES; | 2685 return YES; |
| 2685 } | 2686 } |
| 2686 | 2687 |
| 2687 @end | 2688 @end |
| OLD | NEW |