diff options
Diffstat (limited to 'chrome/browser/views/options/languages_page_view.cc')
-rw-r--r-- | chrome/browser/views/options/languages_page_view.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/views/options/languages_page_view.cc b/chrome/browser/views/options/languages_page_view.cc index 2c9ef19..fb449fc 100644 --- a/chrome/browser/views/options/languages_page_view.cc +++ b/chrome/browser/views/options/languages_page_view.cc @@ -243,6 +243,7 @@ class AddLanguageWindowView : public ChromeViews::View, // ChromeViews::WindowDelegate method. virtual bool IsModal() const { return true; } + virtual ChromeViews::View* GetContentsView() { return this; } // ChromeViews::ComboBox::Listener implementation: virtual void ItemChanged(ChromeViews::ComboBox* combo_box, @@ -525,12 +526,10 @@ void LanguagesPageView::ButtonPressed(ChromeViews::NativeButton* sender) { OnRemoveLanguage(); language_table_edited_ = true; } else if (sender == add_button_) { - AddLanguageWindowView* instance = new AddLanguageWindowView(this, profile()); - HWND parent_hwnd = GetViewContainer()->GetHWND(); - ChromeViews::Window* w = - ChromeViews::Window::CreateChromeWindow(parent_hwnd, gfx::Rect(), - instance, instance); - w->Show(); + ChromeViews::Window::CreateChromeWindow( + GetViewContainer()->GetHWND(), + gfx::Rect(), + new AddLanguageWindowView(this, profile()))->Show(); language_table_edited_ = true; } } |