Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 23478020: Makes sure that an input method doesn't reference to a destroyed object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Worked on nits. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_win.h" 5 #include "content/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include <InputScope.h> 7 #include <InputScope.h>
8 #include <wtsapi32.h> 8 #include <wtsapi32.h>
9 #pragma comment(lib, "wtsapi32.lib") 9 #pragma comment(lib, "wtsapi32.lib")
10 10
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 UpdateCursorIfOverSelf(); 802 UpdateCursorIfOverSelf();
803 Destroy(); 803 Destroy();
804 } 804 }
805 805
806 bool RenderWidgetHostViewWin::CanSubscribeFrame() const { 806 bool RenderWidgetHostViewWin::CanSubscribeFrame() const {
807 return render_widget_host_ != NULL; 807 return render_widget_host_ != NULL;
808 } 808 }
809 809
810 void RenderWidgetHostViewWin::WillWmDestroy() { 810 void RenderWidgetHostViewWin::WillWmDestroy() {
811 CleanupCompositorWindow(); 811 CleanupCompositorWindow();
812 if (base::win::IsTSFAwareRequired() && GetFocus() == m_hWnd) 812 if (base::win::IsTSFAwareRequired())
813 ui::TSFBridge::GetInstance()->RemoveFocusedClient(this); 813 ui::TSFBridge::GetInstance()->RemoveFocusedClient(this);
814 } 814 }
815 815
816 void RenderWidgetHostViewWin::Destroy() { 816 void RenderWidgetHostViewWin::Destroy() {
817 // We've been told to destroy. 817 // We've been told to destroy.
818 // By clearing close_on_deactivate_, we prevent further deactivations 818 // By clearing close_on_deactivate_, we prevent further deactivations
819 // (caused by windows messages resulting from the DestroyWindow) from 819 // (caused by windows messages resulting from the DestroyWindow) from
820 // triggering further destructions. The deletion of this is handled by 820 // triggering further destructions. The deletion of this is handled by
821 // OnFinalMessage(); 821 // OnFinalMessage();
822 close_on_deactivate_ = false; 822 close_on_deactivate_ = false;
(...skipping 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after
3199 return new RenderWidgetHostViewWin(widget); 3199 return new RenderWidgetHostViewWin(widget);
3200 } 3200 }
3201 3201
3202 // static 3202 // static
3203 void RenderWidgetHostViewPort::GetDefaultScreenInfo( 3203 void RenderWidgetHostViewPort::GetDefaultScreenInfo(
3204 WebKit::WebScreenInfo* results) { 3204 WebKit::WebScreenInfo* results) {
3205 GetScreenInfoForWindow(0, results); 3205 GetScreenInfoForWindow(0, results);
3206 } 3206 }
3207 3207
3208 } // namespace content 3208 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/base/ime/dummy_input_method.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698