15267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)/* 25267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * Copyright (C) 2012 Google Inc. All rights reserved. 35267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * 45267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * Redistribution and use in source and binary forms, with or without 55267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * modification, are permitted provided that the following conditions 65267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * are met: 75267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * 1. Redistributions of source code must retain the above copyright 85267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * notice, this list of conditions and the following disclaimer. 95267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * 2. Redistributions in binary form must reproduce the above copyright 105267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * notice, this list of conditions and the following disclaimer in the 115267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * documentation and/or other materials provided with the distribution. 125267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * 135267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND 145267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 155267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 165267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE 175267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 185267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 195267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 205267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 215267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 225267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 235267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) * SUCH DAMAGE. 245267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) */ 255267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) 265267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)#ifndef WebDateTimeChooserCompletion_h 275267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)#define WebDateTimeChooserCompletion_h 285267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) 295267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)#include "../platform/WebString.h" 305267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) 3151b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)namespace blink { 325267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) 335267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)// Gets called back when WebViewClient finished choosing a date/time value. 345267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)class WebDateTimeChooserCompletion { 355267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)public: 365267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) 375267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) // Called with a date/time value in the HTML format. The callback instance 385267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) // is destroyed when this method is called. 3951b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) // FIXME: Remove. Deprecated in favor of double version. 405267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) virtual void didChooseValue(const WebString&) = 0; 415267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) 4251b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) // Called with a date/time value in the HTML format. The callback instance 4351b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) // is destroyed when this method is called. If the value is NaN it means an 4451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) // empty value. Value should not be infinity. 4551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) virtual void didChooseValue(double) = 0; 4651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) 475267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) // Called when a user closed the chooser without choosing a value. The 485267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) // callback instance is destroyed when this method is called. 495267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) virtual void didCancelChooser() = 0; 505267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) 515267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)protected: 525267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) virtual ~WebDateTimeChooserCompletion() { } 535267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)}; 545267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) 5551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)} // namespace blink 565267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) 575267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)#endif 58