Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: Source/web/ChromeClientImpl.cpp

Issue 23236002: Prepare for color input datalist support on Android (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added labels Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 PassOwnPtr<ColorChooser> ChromeClientImpl::createColorChooser(ColorChooserClient * chooserClient, const Color&) 609 PassOwnPtr<ColorChooser> ChromeClientImpl::createColorChooser(ColorChooserClient * chooserClient, const Color&)
610 { 610 {
611 OwnPtr<ColorChooserUIController> controller; 611 OwnPtr<ColorChooserUIController> controller;
612 if (RuntimeEnabledFeatures::pagePopupEnabled()) 612 if (RuntimeEnabledFeatures::pagePopupEnabled())
613 controller = adoptPtr(new ColorChooserPopupUIController(this, chooserCli ent)); 613 controller = adoptPtr(new ColorChooserPopupUIController(this, chooserCli ent));
614 else 614 else
615 controller = adoptPtr(new ColorChooserUIController(this, chooserClient)) ; 615 controller = adoptPtr(new ColorChooserUIController(this, chooserClient)) ;
616 controller->openUI(); 616 controller->openUI();
617 return controller.release(); 617 return controller.release();
618 } 618 }
619 PassOwnPtr<WebColorChooser> ChromeClientImpl::createWebColorChooser(WebColorChoo serClient* chooserClient, const WebColor& initialColor) 619 PassOwnPtr<WebColorChooser> ChromeClientImpl::createWebColorChooser(WebColorChoo serClient* chooserClient, const WebColor& initialColor, const Vector<Color>& sug gestions, const Vector<String>& suggestionLabels)
620 { 620 {
621 WebViewClient* client = m_webView->client(); 621 WebViewClient* client = m_webView->client();
622 if (!client) 622 if (!client)
623 return nullptr; 623 return nullptr;
624 return adoptPtr(client->createColorChooser(chooserClient, initialColor)); 624 Vector<WebColor> suggestionColors(suggestions.size());
625 for (size_t i = 0; i < suggestions.size(); ++i) {
626 suggestionColors[i] = static_cast<WebColor>(suggestions[i].rgb());
627 }
628 return adoptPtr(client->createColorChooser(chooserClient, initialColor, sugg estionColors, suggestionLabels));
625 } 629 }
626 630
627 PassRefPtr<DateTimeChooser> ChromeClientImpl::openDateTimeChooser(DateTimeChoose rClient* pickerClient, const DateTimeChooserParameters& parameters) 631 PassRefPtr<DateTimeChooser> ChromeClientImpl::openDateTimeChooser(DateTimeChoose rClient* pickerClient, const DateTimeChooserParameters& parameters)
628 { 632 {
629 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 633 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
630 return DateTimeChooserImpl::create(this, pickerClient, parameters); 634 return DateTimeChooserImpl::create(this, pickerClient, parameters);
631 #else 635 #else
632 return ExternalDateTimeChooser::create(this, m_webView->client(), pickerClie nt, parameters); 636 return ExternalDateTimeChooser::create(this, m_webView->client(), pickerClie nt, parameters);
633 #endif 637 #endif
634 } 638 }
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 { 1005 {
1002 } 1006 }
1003 1007
1004 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title) 1008 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title)
1005 { 1009 {
1006 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); 1010 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title);
1007 } 1011 }
1008 #endif 1012 #endif
1009 1013
1010 } // namespace WebKit 1014 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698