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

Unified Diff: ui/views/controls/native/native_view_host_win.cc

Issue 10910034: Attempt 2 at: Fixes crash that occured because NativeViewHostAura::Detach was not (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: da fix Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/native/native_view_host_win.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/native/native_view_host_win.cc
diff --git a/ui/views/controls/native/native_view_host_win.cc b/ui/views/controls/native/native_view_host_win.cc
index 72e8d42a7edf0e8d1d0fc9d26d43504e20e70289..4916752cfde93c7953976fcca7fc9b5b233c8ccf 100644
--- a/ui/views/controls/native/native_view_host_win.cc
+++ b/ui/views/controls/native/native_view_host_win.cc
@@ -48,7 +48,6 @@ void NativeViewHostWin::NativeViewDetaching(bool destroyed) {
if (!destroyed) {
if (installed_clip_)
UninstallClip();
- ClearFocus();
SetParent(host_->native_view(), ui::GetHiddenWindow());
}
installed_clip_ = false;
@@ -148,20 +147,6 @@ gfx::NativeViewAccessible NativeViewHostWin::GetNativeViewAccessible() {
}
}
-void NativeViewHostWin::ClearFocus() {
- FocusManager* focus_manager = host_->GetFocusManager();
- if (!focus_manager || !focus_manager->GetFocusedView())
- return;
-
- Widget::Widgets widgets;
- Widget::GetAllChildWidgets(host_->native_view(), &widgets);
- for (Widget::Widgets::iterator i = widgets.begin(); i != widgets.end(); ++i) {
- focus_manager->ViewRemoved((*i)->GetRootView());
- if (!focus_manager->GetFocusedView())
- return;
- }
-}
-
////////////////////////////////////////////////////////////////////////////////
// NativeViewHostWrapper, public:
« no previous file with comments | « ui/views/controls/native/native_view_host_win.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698