Chromium Code Reviews

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_mac.mm

Issue 5172009: This adds some plumbing for propagating the reason for a renderer's death (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
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 718 matching lines...)
729 } 729 }
730 730
731 // If |about_to_validate_and_paint_| is set, then -drawRect: is on the stack 731 // If |about_to_validate_and_paint_| is set, then -drawRect: is on the stack
732 // and it's not allowed to call -setHidden on the accelerated view. In that 732 // and it's not allowed to call -setHidden on the accelerated view. In that
733 // case, -callSetNeedsDisplayInRect: will hide it later. 733 // case, -callSetNeedsDisplayInRect: will hide it later.
734 // If |about_to_validate_and_paint_| is not set, do it now. 734 // If |about_to_validate_and_paint_| is not set, do it now.
735 if (!about_to_validate_and_paint_) 735 if (!about_to_validate_and_paint_)
736 HandleDelayedGpuViewHiding(); 736 HandleDelayedGpuViewHiding();
737 } 737 }
738 738
739 void RenderWidgetHostViewMac::RenderViewGone() { 739 void RenderWidgetHostViewMac::RenderViewGone(base::TerminationStatus status,
740 int error_code) {
740 // TODO(darin): keep this around, and draw sad-tab into it. 741 // TODO(darin): keep this around, and draw sad-tab into it.
741 UpdateCursorIfOverSelf(); 742 UpdateCursorIfOverSelf();
742 Destroy(); 743 Destroy();
743 } 744 }
744 745
745 void RenderWidgetHostViewMac::Destroy() { 746 void RenderWidgetHostViewMac::Destroy() {
746 // On Windows, popups are implemented with a popup window style, so that when 747 // On Windows, popups are implemented with a popup window style, so that when
747 // an event comes in that would "cancel" it, it receives the OnCancelMode 748 // an event comes in that would "cancel" it, it receives the OnCancelMode
748 // message and can kill itself. Alas, on the Mac, views cannot capture events 749 // message and can kill itself. Alas, on the Mac, views cannot capture events
749 // outside of themselves. On Windows, if Destroy is being called on a view, 750 // outside of themselves. On Windows, if Destroy is being called on a view,
(...skipping 1818 matching lines...)
2568 if (!string) return NO; 2569 if (!string) return NO;
2569 2570
2570 // If the user is currently using an IME, confirm the IME input, 2571 // If the user is currently using an IME, confirm the IME input,
2571 // and then insert the text from the service, the same as TextEdit and Safari. 2572 // and then insert the text from the service, the same as TextEdit and Safari.
2572 [self confirmComposition]; 2573 [self confirmComposition];
2573 [self insertText:string]; 2574 [self insertText:string];
2574 return YES; 2575 return YES;
2575 } 2576 }
2576 2577
2577 @end 2578 @end
OLDNEW

Powered by Google App Engine