| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 0e242151653b62d9395cf48689895cefe7af45dc..32c59d2482db1491aded6c8e0532211a01b9b729 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -151,6 +151,7 @@
|
| #include "chrome/common/profiling.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "chrome/common/web_apps.h"
|
| +#include "content/public/browser/color_chooser.h"
|
| #include "content/public/browser/devtools_manager.h"
|
| #include "content/public/browser/download_item.h"
|
| #include "content/public/browser/download_manager.h"
|
| @@ -4155,6 +4156,28 @@ content::JavaScriptDialogCreator* Browser::GetJavaScriptDialogCreator() {
|
| return GetJavaScriptDialogCreatorInstance();
|
| }
|
|
|
| +content::ColorChooser* Browser::OpenColorChooser(WebContents* tab,
|
| + int color_chooser_id,
|
| + const SkColor& color) {
|
| +#if defined(OS_WIN)
|
| + // On Windows, only create a color chooser if one doesn't exist, because we
|
| + // can't close the old color chooser dialog.
|
| + if (!color_chooser_.get())
|
| + color_chooser_.reset(content::ColorChooser::Create(color_chooser_id, tab,
|
| + color));
|
| +#else
|
| + if (color_chooser_.get())
|
| + color_chooser_->End();
|
| + color_chooser_.reset(content::ColorChooser::Create(color_chooser_id, tab,
|
| + color));
|
| +#endif
|
| + return color_chooser_.get();
|
| +}
|
| +
|
| +void Browser::DidEndColorChooser() {
|
| + color_chooser_.reset();
|
| +}
|
| +
|
| void Browser::RunFileChooser(WebContents* tab,
|
| const content::FileChooserParams& params) {
|
| RunFileChooserHelper(tab, params);
|
|
|