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

Unified Diff: chrome/browser/ui/views/color_chooser_win.cc

Issue 128053002: Make WebContentsDelegate::OpenColorChooser return NULL on failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/color_chooser_win.cc
diff --git a/chrome/browser/ui/views/color_chooser_win.cc b/chrome/browser/ui/views/color_chooser_win.cc
index ca4ae2c7c5c722b43789a7a169fd3e13c1901d49..0fde02044519c437faecdcc532a32175a611676b 100644
--- a/chrome/browser/ui/views/color_chooser_win.cc
+++ b/chrome/browser/ui/views/color_chooser_win.cc
@@ -52,8 +52,9 @@ ColorChooserWin* ColorChooserWin::current_color_chooser_ = NULL;
ColorChooserWin* ColorChooserWin::Open(content::WebContents* web_contents,
SkColor initial_color) {
- if (!current_color_chooser_)
- current_color_chooser_ = new ColorChooserWin(web_contents, initial_color);
+ if (current_color_chooser_)
+ return NULL;
+ current_color_chooser_ = new ColorChooserWin(web_contents, initial_color);
return current_color_chooser_;
}
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698