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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationRequest.h

Issue 2552343009: [Presentation API] Adds DOMString[] constructor to PresentationRequest. (Closed)
Patch Set: resolve code review comments from mlamouri Created 4 years 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: third_party/WebKit/Source/modules/presentation/PresentationRequest.h
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationRequest.h b/third_party/WebKit/Source/modules/presentation/PresentationRequest.h
index 70cd618b38c7cb291353e6c0a77bfb31ca8ba5ec..d93c93e3409de023997a8f08134ac89d66deec38 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationRequest.h
+++ b/third_party/WebKit/Source/modules/presentation/PresentationRequest.h
@@ -9,17 +9,20 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "core/dom/ActiveDOMObject.h"
#include "core/events/EventTarget.h"
+#include "modules/ModulesExport.h"
#include "platform/heap/Handle.h"
#include "platform/heap/Heap.h"
#include "platform/weborigin/KURL.h"
+#include "wtf/Vector.h"
namespace blink {
// Implements the PresentationRequest interface from the Presentation API from
// which websites can start or join presentation connections.
-class PresentationRequest final : public EventTargetWithInlineData,
- public ActiveScriptWrappable,
- public ActiveDOMObject {
+class MODULES_EXPORT PresentationRequest final
+ : public EventTargetWithInlineData,
+ public ActiveScriptWrappable,
+ public ActiveDOMObject {
USING_GARBAGE_COLLECTED_MIXIN(PresentationRequest);
DEFINE_WRAPPERTYPEINFO();
@@ -29,6 +32,9 @@ class PresentationRequest final : public EventTargetWithInlineData,
static PresentationRequest* create(ExecutionContext*,
const String& url,
ExceptionState&);
+ static PresentationRequest* create(ExecutionContext*,
+ const WTF::Vector<String>& urls,
+ ExceptionState&);
// EventTarget implementation.
const AtomicString& interfaceName() const override;
@@ -41,7 +47,7 @@ class PresentationRequest final : public EventTargetWithInlineData,
ScriptPromise reconnect(ScriptState*, const String& id);
ScriptPromise getAvailability(ScriptState*);
- const KURL& url() const;
+ const WTF::Vector<KURL>& urls() const;
DEFINE_ATTRIBUTE_EVENT_LISTENER(connectionavailable);
@@ -53,9 +59,9 @@ class PresentationRequest final : public EventTargetWithInlineData,
RegisteredEventListener&) override;
private:
- PresentationRequest(ExecutionContext*, const KURL&);
+ PresentationRequest(ExecutionContext*, const WTF::Vector<KURL>&);
- KURL m_url;
+ WTF::Vector<KURL> m_urls;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698