PassOwnPtr<WebColorChooser> ChromeClientImpl::createWebColorChooser(WebColorChooserClient* chooserClient, const WebColor& initialColor) { WebViewClient* client = m_webView->client(); if (!client) return nullptr; return adoptPtr(client->createColorChooser(chooserClient, initialColor)); }
PassOwnPtr<ColorChooser> ChromeClientImpl::createColorChooser(ColorChooserClient* chooserClient, const Color& initialColor) { WebViewClient* client = m_webView->client(); if (!client) return nullptr; WebColorChooserClientImpl* chooserClientProxy = new WebColorChooserClientImpl(chooserClient); WebColor webColor = static_cast<WebColor>(initialColor.rgb()); WebColorChooser* chooser = client->createColorChooser(chooserClientProxy, webColor); if (!chooser) return nullptr; return adoptPtr(new ColorChooserProxy(adoptPtr(chooser))); }