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

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

Issue 940503002: [PresentationAPI] Added plumbing for start/joinSession from JS to platform (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed comment Created 5 years, 10 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"
mlamouri (slow - plz ping) 2015/02/25 20:51:06 Why do you now need to #include instead of fwd dec
whywhat 2015/02/25 21:04:14 That's where WebPresentationSessionClientCallbacks
12 #include "public/platform/modules/presentation/WebPresentationController.h" 13 #include "public/platform/modules/presentation/WebPresentationController.h"
13 14
14 namespace blink { 15 namespace blink {
15 16
16 class LocalFrame; 17 class LocalFrame;
17 class WebPresentationClient;
18 18
19 // The coordinator between the various page exposed properties and the content 19 // The coordinator between the various page exposed properties and the content
20 // layer represented via |WebPresentationClient|. 20 // layer represented via |WebPresentationClient|.
21 class PresentationController final 21 class PresentationController final
22 : public NoBaseWillBeGarbageCollectedFinalized<PresentationController> 22 : public NoBaseWillBeGarbageCollectedFinalized<PresentationController>
23 , public WillBeHeapSupplement<LocalFrame> 23 , public WillBeHeapSupplement<LocalFrame>
24 , public FrameDestructionObserver 24 , public FrameDestructionObserver
25 , public WebPresentationController { 25 , public WebPresentationController {
26 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationController); 26 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationController);
27 WTF_MAKE_NONCOPYABLE(PresentationController); 27 WTF_MAKE_NONCOPYABLE(PresentationController);
(...skipping 11 matching lines...) Expand all
39 DECLARE_VIRTUAL_TRACE(); 39 DECLARE_VIRTUAL_TRACE();
40 40
41 // Implementation of WebPresentationController. 41 // Implementation of WebPresentationController.
42 virtual void didChangeAvailability(bool available) override; 42 virtual void didChangeAvailability(bool available) override;
43 virtual bool isAvailableChangeWatched() const override; 43 virtual bool isAvailableChangeWatched() const override;
44 44
45 // Called when the first listener was added to or the last listener was remo ved from the 45 // Called when the first listener was added to or the last listener was remo ved from the
46 // |availablechange| event. 46 // |availablechange| event.
47 void updateAvailableChangeWatched(bool watched); 47 void updateAvailableChangeWatched(bool watched);
48 48
49 // Called when the frame wants to start a new presentation.
50 void startSession(const String& presentationUrl, const String& presentationI d, WebPresentationSessionClientCallbacks*);
51
52 // Called when the frame wants to join an existing presentation.
53 void joinSession(const String& presentationUrl, const String& presentationId , WebPresentationSessionClientCallbacks*);
54
49 // Connects the |Presentation| object with this controller. 55 // Connects the |Presentation| object with this controller.
50 void setPresentation(Presentation*); 56 void setPresentation(Presentation*);
51 57
52 private: 58 private:
53 PresentationController(LocalFrame&, WebPresentationClient*); 59 PresentationController(LocalFrame&, WebPresentationClient*);
54 60
55 // Implementation of FrameDestructionObserver. 61 // Implementation of FrameDestructionObserver.
56 virtual void willDetachFrameHost() override; 62 virtual void willDetachFrameHost() override;
57 63
58 WebPresentationClient* m_client; 64 WebPresentationClient* m_client;
59 PersistentWillBeMember<Presentation> m_presentation; 65 PersistentWillBeMember<Presentation> m_presentation;
60 }; 66 };
61 67
62 } // namespace blink 68 } // namespace blink
63 69
64 #endif // PresentationController_h 70 #endif // PresentationController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698