[Win] Make message box modal.

This commit is contained in:
Cheng Zhao 2013-07-24 18:51:03 +08:00
parent 8d41c27a8c
commit 2e7dcade25

View file

@ -40,6 +40,7 @@ class MessageDialog : public base::MessageLoop::Dispatcher,
virtual views::Widget* GetWidget() OVERRIDE;
virtual const views::Widget* GetWidget() const OVERRIDE;
virtual views::ClientView* CreateClientView(views::Widget* widget) OVERRIDE;
virtual ui::ModalType GetModalType() const OVERRIDE;
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
@ -104,6 +105,10 @@ views::ClientView* MessageDialog::CreateClientView(views::Widget* widget) {
return new views::ClientView(widget, message_box_view_);
}
ui::ModalType MessageDialog::GetModalType() const {
return ui::MODAL_TYPE_WINDOW;
}
void MessageDialog::ButtonPressed(views::Button* sender,
const ui::Event& event) {
}