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

Unified Diff: Source/WebKit/chromium/public/WebInbandTextTrack.h

Issue 13968007: Create WebInbandTextTrack and WebInbandTextTrackClient (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporate aaron's comments Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/WebKit/chromium/public/WebInbandTextTrack.h
diff --git a/Source/Platform/chromium/public/WebHyphenator.h b/Source/WebKit/chromium/public/WebInbandTextTrack.h
similarity index 68%
copy from Source/Platform/chromium/public/WebHyphenator.h
copy to Source/WebKit/chromium/public/WebInbandTextTrack.h
index 86bb1bbf9fd94f0de090a7ef96297da2f23396b8..593857ca163bb4eb9527d791f52337f932a79a58 100644
--- a/Source/Platform/chromium/public/WebHyphenator.h
+++ b/Source/WebKit/chromium/public/WebInbandTextTrack.h
@@ -28,24 +28,35 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebHyphenator_h
-#define WebHyphenator_h
-
-#include "WebCommon.h"
-#include "WebString.h"
+#ifndef WebInbandTextTrack_h
+#define WebInbandTextTrack_h
namespace WebKit {
-class WebHyphenator {
-public:
- // Returns whether we can support hyphenation for the given locale.
- virtual bool canHyphenate(const WebString& locale) { return false; }
+class WebString;
+class WebInbandTextTrackClient;
+
+class WebInbandTextTrack {
+ public:
+ enum Kind { KindSubtitles, KindCaptions, KindDescriptions, KindChapters, KindMetadata, 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.
+ enum Mode { ModeDisabled, ModeHidden, ModeShowing };
+
+ virtual ~WebInbandTextTrack() {}
+
+ virtual void setClient(WebInbandTextTrackClient*) = 0;
+ virtual WebInbandTextTrackClient* client() = 0;
+
+ virtual void setMode(Mode) = 0;
+ virtual Mode mode() const = 0;
+
+ virtual Kind kind() const = 0;
+ virtual bool isClosedCaptions() const = 0;
- // Returns the last position where we can add a hyphen before the given position.
- virtual size_t computeLastHyphenLocation(const WebUChar* characters, size_t length, size_t beforeIndex, const WebString& locale) { return 0; }
+ virtual WebString label() const = 0;
+ virtual WebString language() const = 0;
+ virtual bool isDefault() const = 0;
-protected:
- ~WebHyphenator() { }
+ virtual int textTrackIndex() const = 0;
};
} // namespace WebKit

Powered by Google App Engine
This is Rietveld 408576698