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

Side by Side Diff: chrome/browser/ui/color_chooser.cc

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: Open no longer returns NULL, protected ctor/dtor 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/color_chooser.h"
6
7 #include "content/public/browser/web_contents.h"
8
9 ColorChooser* ColorChooser::current_color_chooser_ = NULL;
10
11 ColorChooser::ColorChooser(content::WebContents* web_contents)
12 : web_contents_(web_contents) {
13 DCHECK(!current_color_chooser_);
14 current_color_chooser_ = this;
15 }
16
17 ColorChooser::~ColorChooser() {
18 DCHECK(current_color_chooser_ != this);
19 }
20
21 void ColorChooser::DidChooseColor(SkColor color) {
Ben Goodger (Google) 2013/04/17 15:34:15 ... but looking at how little this class does make
22 if (web_contents_)
23 web_contents_->DidChooseColorInColorChooser(color);
24 }
25
26 void ColorChooser::DidEndColorChooser() {
27 current_color_chooser_ = NULL;
28 if (web_contents_)
29 web_contents_->DidEndColorChooser();
30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698