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

Side by Side Diff: third_party/WebKit/Source/modules/webshare/NavigatorShare.h

Issue 1806253002: Added Web Share (navigator.share) experimental web API (stub). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add argument names. Created 4 years, 5 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 unified diff | Download patch
OLDNEW
(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& title, const String& text);
33 static ScriptPromise share(ScriptState*, Navigator&, const String& title, co nst String& text);
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/modules.gypi ('k') | third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698