diff options
author | Adam Kallai <kadam@inf.u-szeged.hu> | 2015-10-28 07:16:52 -0700 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-12-02 10:23:09 +0000 |
commit | 198908fcb78baf9531c014c5ed96d0d8652a37a0 (patch) | |
tree | 0225eafe92d27dbc56fb17a1787c20af80651693 /src/core/web_contents_delegate_qt.cpp | |
parent | 54cfaae89b784ac6397826d09d7f71f1cefe077a (diff) |
Add support for html color input
Change-Id: I501125631946f70aae1ff039b0e5bcb9198e7242
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index 1897664e3..2d707149d 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -41,6 +41,8 @@ #include "web_contents_delegate_qt.h" #include "browser_context_adapter.h" +#include "color_chooser_qt.h" +#include "color_chooser_controller.h" #include "file_picker_controller.h" #include "media_capture_devices_dispatcher.h" #include "network_delegate_qt.h" @@ -240,6 +242,14 @@ void WebContentsDelegateQt::DidUpdateFaviconURL(const std::vector<content::Favic } } +content::ColorChooser *WebContentsDelegateQt::OpenColorChooser(content::WebContents *source, SkColor color, const std::vector<content::ColorSuggestion> &suggestion) +{ + Q_UNUSED(suggestion); + ColorChooserQt *colorChooser = new ColorChooserQt(source, toQt(color)); + m_viewClient->showColorDialog(colorChooser->controller()); + + return colorChooser; +} content::JavaScriptDialogManager *WebContentsDelegateQt::GetJavaScriptDialogManager(content::WebContents *) { return JavaScriptDialogManagerQt::GetInstance(); |