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

Unified Diff: content/browser/web_contents/web_contents_impl.h

Issue 13150004: Support color chooser inside extesions, apps, chrome frame, dev tool (Closed) Base URL: http://git.chromium.org/chromium/src.git@ngcolor
Patch Set: Removed chrome/browser/ui/color_chooser.cc Created 7 years, 8 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
Index: content/browser/web_contents/web_contents_impl.h
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 3e7ea78fd003bb4910bd861c147c7e93b36cdf97..1da86124f9a663fbc5474d8d60907297c9a00a55 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -261,9 +261,8 @@ class CONTENT_EXPORT WebContentsImpl
virtual int GetContentRestrictions() const OVERRIDE;
virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE;
virtual bool HasOpener() const OVERRIDE;
- virtual void DidChooseColorInColorChooser(int color_chooser_id,
- SkColor color) OVERRIDE;
- virtual void DidEndColorChooser(int color_chooser_id) OVERRIDE;
+ virtual void DidChooseColorInColorChooser(SkColor color) OVERRIDE;
+ virtual void DidEndColorChooser() OVERRIDE;
virtual int DownloadImage(const GURL& url,
bool is_favicon,
int image_size,
@@ -846,7 +845,16 @@ class CONTENT_EXPORT WebContentsImpl
#endif
// Color chooser that was opened by this tab.
- ColorChooser* color_chooser_;
+ scoped_ptr<ColorChooser> color_chooser_;
+
+ // A unique identifier for the current color chooser. Identifiers are unique
+ // across a renderer process. This avoids race conditions in synchronizing
+ // the browser and renderer processes. For example, if a renderer closes one
+ // chooser and opens another, and simultaneously the user picks a color in the
+ // first chooser, the IDs can be used to drop the "chose a color" message
+ // rather than erroneously tell the renderer that the user picked a color in
+ // the second chooser.
+ int color_chooser_identifier_;
// Manages the embedder state for browser plugins, if this WebContents is an
// embedder; NULL otherwise.

Powered by Google App Engine
This is Rietveld 408576698