summaryrefslogtreecommitdiffstats
path: root/webkit/api/public
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-07 05:50:28 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-07 05:50:28 +0000
commit952cb7063b41fc2afaa9d1c265d38158b0e7d3e0 (patch)
treea454f8e01ee6ce946e475f8451ba4e1fd1407007 /webkit/api/public
parent71cd6a943b2b677adabbafdd12b2e024106e78f6 (diff)
downloadchromium_src-952cb7063b41fc2afaa9d1c265d38158b0e7d3e0.zip
chromium_src-952cb7063b41fc2afaa9d1c265d38158b0e7d3e0.tar.gz
chromium_src-952cb7063b41fc2afaa9d1c265d38158b0e7d3e0.tar.bz2
Move MediaPlayerAction to WebMediaPlayerAction. Switch to an enum and a
boolean to express the action. R=ajwong BUG=10033 TEST=none Review URL: http://codereview.chromium.org/251103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28236 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/api/public')
-rw-r--r--webkit/api/public/WebMediaPlayerAction.h55
-rw-r--r--webkit/api/public/WebView.h8
2 files changed, 63 insertions, 0 deletions
diff --git a/webkit/api/public/WebMediaPlayerAction.h b/webkit/api/public/WebMediaPlayerAction.h
new file mode 100644
index 0000000..199b599
--- /dev/null
+++ b/webkit/api/public/WebMediaPlayerAction.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebMediaPlayerAction_h
+#define WebMediaPlayerAction_h
+
+namespace WebKit {
+
+ struct WebMediaPlayerAction {
+ enum Type {
+ Unknown,
+ Play,
+ Mute,
+ Loop
+ };
+
+ Type type;
+ bool enable;
+
+ WebMediaPlayerAction()
+ : type(Unknown), enable(false) { }
+ WebMediaPlayerAction(Type type, bool enable)
+ : type(type), enable(enable) { }
+ };
+
+} // namespace WebKit
+
+#endif
diff --git a/webkit/api/public/WebView.h b/webkit/api/public/WebView.h
index bf7896d..4b1437f 100644
--- a/webkit/api/public/WebView.h
+++ b/webkit/api/public/WebView.h
@@ -41,6 +41,7 @@ namespace WebKit {
class WebSettings;
class WebString;
class WebViewClient;
+ struct WebMediaPlayerAction;
struct WebPoint;
class WebView : public WebWidget {
@@ -141,6 +142,13 @@ namespace WebKit {
virtual void zoomDefault() = 0;
+ // Media ---------------------------------------------------------------
+
+ // Performs the specified action on the node at the given location.
+ virtual void performMediaPlayerAction(
+ const WebMediaPlayerAction&, const WebPoint& location) = 0;
+
+
// Data exchange -------------------------------------------------------
// Copy to the clipboard the image located at a particular point in the