Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NavigatorShare_h | |
| 6 #define NavigatorShare_h | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptPromise.h" | |
| 9 #include "bindings/core/v8/ScriptPromiseResolver.h" | |
| 10 #include "bindings/core/v8/ScriptWrappable.h" | |
| 11 #include "core/dom/ContextLifecycleObserver.h" | |
| 12 #include "core/events/EventTarget.h" | |
| 13 #include "platform/Supplementable.h" | |
| 14 #include "platform/heap/Handle.h" | |
| 15 #include "public/platform/modules/webshare/webshare.mojom-blink.h" | |
| 16 #include "wtf/HashSet.h" | |
| 17 | |
| 18 namespace blink { | |
| 19 | |
| 20 class Navigator; | |
| 21 | |
| 22 class NavigatorShare final : public GarbageCollectedFinalized<NavigatorShare>, p ublic Supplement<Navigator> { | |
| 23 USING_GARBAGE_COLLECTED_MIXIN(NavigatorShare); | |
| 24 public: | |
| 25 ~NavigatorShare(); | |
| 26 | |
| 27 // Gets, or creates, NavigatorShare supplement on Navigator. | |
| 28 // See platform/Supplementable.h | |
| 29 static NavigatorShare& from(Navigator&); | |
| 30 | |
| 31 // Navigator partial interface | |
| 32 ScriptPromise share(ScriptState*, const String&, const String&); | |
| 33 static ScriptPromise share(ScriptState*, Navigator&, const String&, const St ring&); | |
|
Mike West
2016/07/08 07:17:49
Nit: Can you name the various `String` parameters
Matt Giuca
2016/07/11 07:40:38
Done.
| |
| 34 | |
| 35 DECLARE_TRACE(); | |
| 36 | |
| 37 private: | |
| 38 class ShareClientImpl; | |
| 39 | |
| 40 NavigatorShare(); | |
| 41 static const char* supplementName(); | |
| 42 | |
| 43 blink::mojom::blink::ShareServicePtr m_service; | |
| 44 | |
| 45 HeapHashSet<Member<ShareClientImpl>> m_clients; | |
| 46 }; | |
| 47 | |
| 48 } // namespace blink | |
| 49 | |
| 50 #endif // NavigatorShare_h | |
| OLD | NEW |