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 #include "content/browser/renderer_host/render_widget_host_view_mac.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
6 | 6 |
7 #include <QuartzCore/QuartzCore.h> | 7 #include <QuartzCore/QuartzCore.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 } | 721 } |
722 | 722 |
723 // We've been told to destroy. | 723 // We've been told to destroy. |
724 [cocoa_view_ retain]; | 724 [cocoa_view_ retain]; |
725 [cocoa_view_ removeFromSuperview]; | 725 [cocoa_view_ removeFromSuperview]; |
726 [cocoa_view_ autorelease]; | 726 [cocoa_view_ autorelease]; |
727 | 727 |
728 [fullscreen_window_manager_ exitFullscreenMode]; | 728 [fullscreen_window_manager_ exitFullscreenMode]; |
729 fullscreen_window_manager_.reset(); | 729 fullscreen_window_manager_.reset(); |
730 [pepper_fullscreen_window_ close]; | 730 [pepper_fullscreen_window_ close]; |
731 pepper_fullscreen_window_.reset(); | 731 |
| 732 // This can be called as part of processing the window's responder |
| 733 // chain, for instance |-performKeyEquivalent:|. In that case the |
| 734 // object needs to survive until the stack unwinds. |
| 735 pepper_fullscreen_window_.autorelease(); |
732 | 736 |
733 // We get this call just before |render_widget_host_| deletes | 737 // We get this call just before |render_widget_host_| deletes |
734 // itself. But we are owned by |cocoa_view_|, which may be retained | 738 // itself. But we are owned by |cocoa_view_|, which may be retained |
735 // by some other code. Examples are WebContentsViewMac's | 739 // by some other code. Examples are WebContentsViewMac's |
736 // |latent_focus_view_| and TabWindowController's | 740 // |latent_focus_view_| and TabWindowController's |
737 // |cachedContentView_|. | 741 // |cachedContentView_|. |
738 render_widget_host_ = NULL; | 742 render_widget_host_ = NULL; |
739 } | 743 } |
740 | 744 |
741 // Called from the renderer to tell us what the tooltip text should be. It | 745 // Called from the renderer to tell us what the tooltip text should be. It |
(...skipping 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3362 if (!string) return NO; | 3366 if (!string) return NO; |
3363 | 3367 |
3364 // If the user is currently using an IME, confirm the IME input, | 3368 // If the user is currently using an IME, confirm the IME input, |
3365 // and then insert the text from the service, the same as TextEdit and Safari. | 3369 // and then insert the text from the service, the same as TextEdit and Safari. |
3366 [self confirmComposition]; | 3370 [self confirmComposition]; |
3367 [self insertText:string]; | 3371 [self insertText:string]; |
3368 return YES; | 3372 return YES; |
3369 } | 3373 } |
3370 | 3374 |
3371 @end | 3375 @end |
OLD | NEW |