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

Side by Side Diff: Source/modules/presentation/PresentationController.h

Issue 1020303004: [PresentationAPI] Plumbing |onstatechange| event for the PresentationSession from Blink to platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added a return statement for the conversion function Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PresentationController_h 5 #ifndef PresentationController_h
6 #define PresentationController_h 6 #define PresentationController_h
7 7
8 #include "core/frame/FrameDestructionObserver.h" 8 #include "core/frame/FrameDestructionObserver.h"
9 #include "modules/presentation/Presentation.h" 9 #include "modules/presentation/Presentation.h"
10 #include "platform/Supplementable.h" 10 #include "platform/Supplementable.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "public/platform/modules/presentation/WebPresentationClient.h" 12 #include "public/platform/modules/presentation/WebPresentationClient.h"
13 #include "public/platform/modules/presentation/WebPresentationController.h" 13 #include "public/platform/modules/presentation/WebPresentationController.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class LocalFrame; 17 class LocalFrame;
18 class WebPresentationSessionClient; 18 class WebPresentationSessionClient;
19 enum class WebPresentationSessionState;
19 20
20 // The coordinator between the various page exposed properties and the content 21 // The coordinator between the various page exposed properties and the content
21 // layer represented via |WebPresentationClient|. 22 // layer represented via |WebPresentationClient|.
22 class PresentationController final 23 class PresentationController final
23 : public NoBaseWillBeGarbageCollectedFinalized<PresentationController> 24 : public NoBaseWillBeGarbageCollectedFinalized<PresentationController>
24 , public WillBeHeapSupplement<LocalFrame> 25 , public WillBeHeapSupplement<LocalFrame>
25 , public FrameDestructionObserver 26 , public FrameDestructionObserver
26 , public WebPresentationController { 27 , public WebPresentationController {
27 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationController); 28 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationController);
28 WTF_MAKE_NONCOPYABLE(PresentationController); 29 WTF_MAKE_NONCOPYABLE(PresentationController);
29 public: 30 public:
30 virtual ~PresentationController(); 31 virtual ~PresentationController();
31 32
32 static PassOwnPtrWillBeRawPtr<PresentationController> create(LocalFrame&, We bPresentationClient*); 33 static PassOwnPtrWillBeRawPtr<PresentationController> create(LocalFrame&, We bPresentationClient*);
33 34
34 static const char* supplementName(); 35 static const char* supplementName();
35 static PresentationController* from(LocalFrame&); 36 static PresentationController* from(LocalFrame&);
36 37
37 static void provideTo(LocalFrame&, WebPresentationClient*); 38 static void provideTo(LocalFrame&, WebPresentationClient*);
38 39
39 // Implementation of HeapSupplement. 40 // Implementation of HeapSupplement.
40 DECLARE_VIRTUAL_TRACE(); 41 DECLARE_VIRTUAL_TRACE();
41 42
42 // Implementation of WebPresentationController. 43 // Implementation of WebPresentationController.
43 virtual void didChangeAvailability(bool available) override; 44 virtual void didChangeAvailability(bool available) override;
44 virtual bool isAvailableChangeWatched() const override; 45 virtual bool isAvailableChangeWatched() const override;
45 virtual void didStartDefaultSession(WebPresentationSessionClient*) override; 46 virtual void didStartDefaultSession(WebPresentationSessionClient*) override;
47 virtual void didChangeSessionState(WebPresentationSessionClient*, WebPresent ationSessionState) override;
46 48
47 // Called when the first listener was added to or the last listener was remo ved from the 49 // Called when the first listener was added to or the last listener was remo ved from the
48 // |availablechange| event. 50 // |availablechange| event.
49 void updateAvailableChangeWatched(bool watched); 51 void updateAvailableChangeWatched(bool watched);
50 52
51 // Called when the frame wants to start a new presentation. 53 // Called when the frame wants to start a new presentation.
52 void startSession(const String& presentationUrl, const String& presentationI d, WebPresentationSessionClientCallbacks*); 54 void startSession(const String& presentationUrl, const String& presentationI d, WebPresentationSessionClientCallbacks*);
53 55
54 // Called when the frame wants to join an existing presentation. 56 // Called when the frame wants to join an existing presentation.
55 void joinSession(const String& presentationUrl, const String& presentationId , WebPresentationSessionClientCallbacks*); 57 void joinSession(const String& presentationUrl, const String& presentationId , WebPresentationSessionClientCallbacks*);
(...skipping 10 matching lines...) Expand all
66 // Implementation of FrameDestructionObserver. 68 // Implementation of FrameDestructionObserver.
67 virtual void willDetachFrameHost() override; 69 virtual void willDetachFrameHost() override;
68 70
69 WebPresentationClient* m_client; 71 WebPresentationClient* m_client;
70 PersistentWillBeMember<Presentation> m_presentation; 72 PersistentWillBeMember<Presentation> m_presentation;
71 }; 73 };
72 74
73 } // namespace blink 75 } // namespace blink
74 76
75 #endif // PresentationController_h 77 #endif // PresentationController_h
OLDNEW
« no previous file with comments | « Source/modules/presentation/Presentation.cpp ('k') | Source/modules/presentation/PresentationController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698