| 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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 } | 713 } |
| 714 | 714 |
| 715 // We've been told to destroy. | 715 // We've been told to destroy. |
| 716 [cocoa_view_ retain]; | 716 [cocoa_view_ retain]; |
| 717 [cocoa_view_ removeFromSuperview]; | 717 [cocoa_view_ removeFromSuperview]; |
| 718 [cocoa_view_ autorelease]; | 718 [cocoa_view_ autorelease]; |
| 719 | 719 |
| 720 [fullscreen_window_manager_ exitFullscreenMode]; | 720 [fullscreen_window_manager_ exitFullscreenMode]; |
| 721 fullscreen_window_manager_.reset(); | 721 fullscreen_window_manager_.reset(); |
| 722 [pepper_fullscreen_window_ close]; | 722 [pepper_fullscreen_window_ close]; |
| 723 pepper_fullscreen_window_.reset(); | 723 |
| 724 // This can be called as part of processing the window's responder |
| 725 // chain, for instance |-performKeyEquivalent:|. In that case the |
| 726 // object needs to survive until the stack unwinds. |
| 727 pepper_fullscreen_window_.autorelease(); |
| 724 | 728 |
| 725 // We get this call just before |render_widget_host_| deletes | 729 // We get this call just before |render_widget_host_| deletes |
| 726 // itself. But we are owned by |cocoa_view_|, which may be retained | 730 // itself. But we are owned by |cocoa_view_|, which may be retained |
| 727 // by some other code. Examples are WebContentsViewMac's | 731 // by some other code. Examples are WebContentsViewMac's |
| 728 // |latent_focus_view_| and TabWindowController's | 732 // |latent_focus_view_| and TabWindowController's |
| 729 // |cachedContentView_|. | 733 // |cachedContentView_|. |
| 730 render_widget_host_ = NULL; | 734 render_widget_host_ = NULL; |
| 731 } | 735 } |
| 732 | 736 |
| 733 // Called from the renderer to tell us what the tooltip text should be. It | 737 // Called from the renderer to tell us what the tooltip text should be. It |
| (...skipping 2593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3327 if (!string) return NO; | 3331 if (!string) return NO; |
| 3328 | 3332 |
| 3329 // If the user is currently using an IME, confirm the IME input, | 3333 // If the user is currently using an IME, confirm the IME input, |
| 3330 // and then insert the text from the service, the same as TextEdit and Safari. | 3334 // and then insert the text from the service, the same as TextEdit and Safari. |
| 3331 [self confirmComposition]; | 3335 [self confirmComposition]; |
| 3332 [self insertText:string]; | 3336 [self insertText:string]; |
| 3333 return YES; | 3337 return YES; |
| 3334 } | 3338 } |
| 3335 | 3339 |
| 3336 @end | 3340 @end |
| OLD | NEW |