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

Unified Diff: third_party/WebKit/Source/modules/ballista/NavigatorActions.cpp

Issue 1806253002: Added Web Share (navigator.share) experimental web API (stub). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: third_party/WebKit/Source/modules/ballista/NavigatorActions.cpp
diff --git a/third_party/WebKit/Source/modules/ballista/NavigatorActions.cpp b/third_party/WebKit/Source/modules/ballista/NavigatorActions.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..48f07c90879271c979a045bc2a2e3c8818d49239
--- /dev/null
+++ b/third_party/WebKit/Source/modules/ballista/NavigatorActions.cpp
@@ -0,0 +1,51 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "modules/ballista/NavigatorActions.h"
+
+#include "core/frame/Navigator.h"
+#include "modules/ballista/Actions.h"
+
+namespace blink {
+
+NavigatorActions& NavigatorActions::from(Navigator& navigator)
+{
+ NavigatorActions* supplement = static_cast<NavigatorActions*>(HeapSupplement
+<Navigator>::from(navigator, supplementName()));
+ if (!supplement) {
+ supplement = new NavigatorActions();
+ provideTo(navigator, supplementName(), supplement);
+ }
+ return *supplement;
+}
+
+Actions* NavigatorActions::actions(Navigator& navigator)
+{
+ return NavigatorActions::from(navigator).actions();
+}
+
+Actions* NavigatorActions::actions()
+{
+ if (!m_actions)
+ m_actions = Actions::create();
+ return m_actions.get();
+}
+
+DEFINE_TRACE(NavigatorActions)
+{
+ visitor->trace(m_actions);
+ HeapSupplement<Navigator>::trace(visitor);
+}
+
+NavigatorActions::NavigatorActions()
+{
+}
+
+const char* NavigatorActions::supplementName()
+{
+ return "NavigatorActions";
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698