Index: Source/modules/presentation/PresentationController.h |
diff --git a/Source/modules/presentation/PresentationController.h b/Source/modules/presentation/PresentationController.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5239d77b9fe2466dcc2d05721bf8ece1d774dc4c |
--- /dev/null |
+++ b/Source/modules/presentation/PresentationController.h |
@@ -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. |
+ |
+#ifndef PresentationController_h |
+#define PresentationController_h |
+ |
+#include "modules/presentation/Presentation.h" |
+#include "platform/Supplementable.h" |
+#include "platform/heap/Handle.h" |
+#include "public/platform/WebPresentationController.h" |
+ |
+namespace blink { |
+ |
+class LocalFrame; |
+class WebPresentationClient; |
+ |
+class PresentationController final : public NoBaseWillBeGarbageCollectedFinalized<PresentationController>, public WillBeHeapSupplement<LocalFrame>, public WebPresentationController { |
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationController); |
+ WTF_MAKE_NONCOPYABLE(PresentationController); |
+public: |
+ virtual ~PresentationController(); |
+ |
+ static PassOwnPtrWillBeRawPtr<PresentationController> create(LocalFrame&, WebPresentationClient*); |
+ |
+ static const char* supplementName(); |
+ static PresentationController* from(LocalFrame&); |
+ |
+ static void provideTo(LocalFrame&, WebPresentationClient*); |
+ |
+ // Inherited from Supplement. |
Peter Beverloo
2015/01/07 14:29:09
If you override it, then you're not inheriting it.
whywhat
2015/01/07 16:22:16
Done.
|
+ virtual void trace(Visitor*) override; |
+ |
+ // Implementation of WebPresentationController |
+ virtual void deviceAvailabilityChanged(bool available) override; |
+ |
+ void addDeviceAvailabilityListener(); |
+ void removeDeviceAvailabilityListener(); |
+ |
+ void setPresentation(Presentation*); |
+ |
+private: |
+ PresentationController(LocalFrame&, WebPresentationClient*); |
+ |
+ WebPresentationClient* m_client; |
+ PersistentWillBeMember<Presentation> m_presentation; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // PresentationController_h |