Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebHyphenator_h | 31 #ifndef WebInbandTextTrack_h |
| 32 #define WebHyphenator_h | 32 #define WebInbandTextTrack_h |
| 33 | |
| 34 #include "WebCommon.h" | |
| 35 #include "WebString.h" | |
| 36 | 33 |
| 37 namespace WebKit { | 34 namespace WebKit { |
| 38 | 35 |
| 39 class WebHyphenator { | 36 class WebString; |
| 40 public: | 37 class WebInbandTextTrackClient; |
| 41 // Returns whether we can support hyphenation for the given locale. | |
| 42 virtual bool canHyphenate(const WebString& locale) { return false; } | |
| 43 | 38 |
| 44 // Returns the last position where we can add a hyphen before the given posi tion. | 39 class WebInbandTextTrack { |
| 45 virtual size_t computeLastHyphenLocation(const WebUChar* characters, size_t length, size_t beforeIndex, const WebString& locale) { return 0; } | 40 public: |
| 41 enum Kind { KindSubtitles, KindCaptions, KindDescriptions, KindChapters, KindM etadata, KindNone }; | |
|
acolwell GONE FROM CHROMIUM
2013/04/19 17:45:49
Please add appropriate entries in Source/WebKit/ch
Matthew Heaney (Chromium)
2013/04/20 04:19:25
Done.
| |
| 42 enum Mode { ModeDisabled, ModeHidden, ModeShowing }; | |
| 46 | 43 |
| 47 protected: | 44 virtual ~WebInbandTextTrack() {} |
| 48 ~WebHyphenator() { } | 45 |
| 46 virtual void setClient(WebInbandTextTrackClient*) = 0; | |
| 47 virtual WebInbandTextTrackClient* client() = 0; | |
| 48 | |
| 49 virtual void setMode(Mode) = 0; | |
| 50 virtual Mode mode() const = 0; | |
| 51 | |
| 52 virtual Kind kind() const = 0; | |
| 53 virtual bool isClosedCaptions() const = 0; | |
| 54 | |
| 55 virtual WebString label() const = 0; | |
| 56 virtual WebString language() const = 0; | |
| 57 virtual bool isDefault() const = 0; | |
| 58 | |
| 59 virtual int textTrackIndex() const = 0; | |
| 49 }; | 60 }; |
| 50 | 61 |
| 51 } // namespace WebKit | 62 } // namespace WebKit |
| 52 | 63 |
| 53 #endif | 64 #endif |
| OLD | NEW |