| Index: chrome/browser/ui/views/color_chooser_win.cc
|
| ===================================================================
|
| --- chrome/browser/ui/views/color_chooser_win.cc (revision 222975)
|
| +++ chrome/browser/ui/views/color_chooser_win.cc (working copy)
|
| @@ -24,7 +24,7 @@
|
| ~ColorChooserWin();
|
|
|
| // content::ColorChooser overrides:
|
| - virtual void End() OVERRIDE {}
|
| + virtual void End() OVERRIDE;
|
| virtual void SetSelectedColor(SkColor color) OVERRIDE {}
|
|
|
| // views::ColorChooserListener overrides:
|
| @@ -66,6 +66,16 @@
|
| DCHECK(!color_chooser_dialog_);
|
| }
|
|
|
| +void ColorChooserWin::End() {
|
| + // The ColorChooserDialog's listener is going away. Ideally we'd
|
| + // programmatically close the dialog at this point. Since that's impossible,
|
| + // we instead tell the dialog its listener is going away, so that the dialog
|
| + // doesn't try to communicate with a destroyed listener later. (We also tell
|
| + // the renderer the dialog is closed, since from the renderer's perspective
|
| + // it effectively is.)
|
| + OnColorChooserDialogClosed();
|
| +}
|
| +
|
| void ColorChooserWin::OnColorChosen(SkColor color) {
|
| if (web_contents_)
|
| web_contents_->DidChooseColorInColorChooser(color);
|
|
|