| Index: chrome/browser/ui/color_chooser.cc
|
| diff --git a/chrome/browser/ui/color_chooser.cc b/chrome/browser/ui/color_chooser.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c50eb762584d1b9ea64098c2b11c60dc28aafdb6
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/color_chooser.cc
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/ui/color_chooser.h"
|
| +
|
| +#include "content/public/browser/web_contents.h"
|
| +
|
| +ColorChooser* ColorChooser::current_color_chooser_ = NULL;
|
| +
|
| +ColorChooser::ColorChooser(content::WebContents* web_contents)
|
| + : web_contents_(web_contents) {
|
| + DCHECK(!current_color_chooser_);
|
| + current_color_chooser_ = this;
|
| +}
|
| +
|
| +ColorChooser::~ColorChooser() {
|
| + DCHECK(current_color_chooser_ != this);
|
| +}
|
| +
|
| +void ColorChooser::DidChooseColor(SkColor color) {
|
| + if (web_contents_)
|
| + web_contents_->DidChooseColorInColorChooser(color);
|
| +}
|
| +
|
| +void ColorChooser::DidEndColorChooser() {
|
| + current_color_chooser_ = NULL;
|
| + if (web_contents_)
|
| + web_contents_->DidEndColorChooser();
|
| +}
|
|
|