diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/views/constrained_window_win.cc | 6 | ||||
-rw-r--r-- | chrome/browser/views/constrained_window_win.h | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/chrome/browser/views/constrained_window_win.cc b/chrome/browser/views/constrained_window_win.cc index 7874b12..4230606 100644 --- a/chrome/browser/views/constrained_window_win.cc +++ b/chrome/browser/views/constrained_window_win.cc @@ -563,7 +563,8 @@ views::NonClientFrameView* ConstrainedWindowWin::CreateFrameViewForWindow() { } void ConstrainedWindowWin::FocusConstrainedWindow() { - focused_view_->RequestFocus(); + if (GetDelegate() && GetDelegate()->GetInitiallyFocusedView()) + GetDelegate()->GetInitiallyFocusedView()->RequestFocus(); } void ConstrainedWindowWin::ShowConstrainedWindow() { @@ -611,9 +612,6 @@ ConstrainedWindowWin::ConstrainedWindowWin( set_focus_on_creation(false); WindowWin::Init(owner_->GetNativeView(), gfx::Rect()); - - focused_view_ = window_delegate->GetContentsView(); - DCHECK(focused_view_); } void ConstrainedWindowWin::ActivateConstrainedWindow() { diff --git a/chrome/browser/views/constrained_window_win.h b/chrome/browser/views/constrained_window_win.h index 5e925b3..9b17bf6 100644 --- a/chrome/browser/views/constrained_window_win.h +++ b/chrome/browser/views/constrained_window_win.h @@ -71,7 +71,6 @@ class ConstrainedWindowWin : public ConstrainedWindow, // Current display rectangle (relative to owner_'s visible area). gfx::Rect current_bounds_; - views::View* focused_view_; DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowWin); }; |