| Index: chrome/browser/ui/color_chooser_dialog.h
|
| diff --git a/chrome/browser/ui/color_chooser_dialog.h b/chrome/browser/ui/color_chooser_dialog.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..10f7825b3842f30b998862997301341da4a65df5
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/color_chooser_dialog.h
|
| @@ -0,0 +1,39 @@
|
| +// Copyright (c) 2011 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.
|
| +
|
| +#ifndef CHROME_BROWSER_UI_COLOR_CHOOSER_DIALOG_H_
|
| +#define CHROME_BROWSER_UI_COLOR_CHOOSER_DIALOG_H_
|
| +#pragma once
|
| +
|
| +#include "chrome/browser/ui/base_shell_dialog.h"
|
| +#include "base/memory/ref_counted.h"
|
| +#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebColor.h"
|
| +
|
| +// Shows a dialog for choosing color.
|
| +class ColorChooserDialog
|
| + : public base::RefCountedThreadSafe<ColorChooserDialog>,
|
| + public BaseShellDialog {
|
| + public:
|
| + // An interface implemented by a Listener object wishing to know about the
|
| + // the results from the color chooser dialog.
|
| + class Listener {
|
| + public:
|
| + virtual void DidChooseColor(WebKit::WebColor color) = 0;
|
| + virtual void DidEnd() = 0;
|
| + };
|
| +
|
| + // Creates a dialog box helper. This object is ref-counted, but the returned
|
| + // object will have no reference (refcount is 0).
|
| + static ColorChooserDialog* Create(Listener* listener);
|
| +
|
| + // Opens the color chooser dialog.
|
| + virtual void SelectColor(WebKit::WebColor initial_color,
|
| + gfx::NativeWindow owning_window) = 0;
|
| +
|
| + explicit ColorChooserDialog() { }
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ColorChooserDialog);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_COLOR_CHOOSER_DIALOG_H_
|
|
|