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

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationReceiver.h

Issue 2801823003: [Presentation API] Change connection to 'connected' if start a presentation with "https://www.googl… (Closed)
Patch Set: resolve code review comments from Mark Created 3 years, 8 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 PresentationReceiver_h 5 #ifndef PresentationReceiver_h
6 #define PresentationReceiver_h 6 #define PresentationReceiver_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseProperty.h" 9 #include "bindings/core/v8/ScriptPromiseProperty.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 19 matching lines...) Expand all
30 public ContextClient, 30 public ContextClient,
31 public WebPresentationReceiver { 31 public WebPresentationReceiver {
32 USING_GARBAGE_COLLECTED_MIXIN(PresentationReceiver); 32 USING_GARBAGE_COLLECTED_MIXIN(PresentationReceiver);
33 DEFINE_WRAPPERTYPEINFO(); 33 DEFINE_WRAPPERTYPEINFO();
34 using ConnectionListProperty = 34 using ConnectionListProperty =
35 ScriptPromiseProperty<Member<PresentationReceiver>, 35 ScriptPromiseProperty<Member<PresentationReceiver>,
36 Member<PresentationConnectionList>, 36 Member<PresentationConnectionList>,
37 Member<DOMException>>; 37 Member<DOMException>>;
38 38
39 public: 39 public:
40 explicit PresentationReceiver(LocalFrame*, WebPresentationClient*); 40 PresentationReceiver(LocalFrame*, WebPresentationClient*);
41 ~PresentationReceiver() = default; 41 ~PresentationReceiver() = default;
42 42
43 // This need to be eagerly created in order to have the receiver associated
imcheng 2017/04/11 02:00:27 nit: Feels like this should be a class-level comme
zhaobin 2017/04/11 02:57:51 Done.
44 // with the client.
45 MODULES_EXPORT static PresentationReceiver* from(Document&);
46
43 // PresentationReceiver.idl implementation 47 // PresentationReceiver.idl implementation
44 ScriptPromise connectionList(ScriptState*); 48 ScriptPromise connectionList(ScriptState*);
45 49
46 // Implementation of WebPresentationController. 50 // Implementation of WebPresentationController.
47 WebPresentationConnection* onReceiverConnectionAvailable( 51 WebPresentationConnection* onReceiverConnectionAvailable(
48 const WebPresentationInfo&) override; 52 const WebPresentationInfo&) override;
49 void didChangeConnectionState(WebPresentationConnectionState) override; 53 void didChangeConnectionState(WebPresentationConnectionState) override;
50 void terminateConnection() override; 54 void terminateConnection() override;
51 55
52 void registerConnection(PresentationConnection*); 56 void registerConnection(PresentationConnection*);
53 57
54 DECLARE_VIRTUAL_TRACE(); 58 DECLARE_VIRTUAL_TRACE();
55 59
56 private: 60 private:
57 friend class PresentationReceiverTest; 61 friend class PresentationReceiverTest;
58 62
59 void recordOriginTypeAccess(Document*) const; 63 void recordOriginTypeAccess(Document*) const;
60 64
61 Member<ConnectionListProperty> m_connectionListProperty; 65 Member<ConnectionListProperty> m_connectionListProperty;
62 Member<PresentationConnectionList> m_connectionList; 66 Member<PresentationConnectionList> m_connectionList;
63 }; 67 };
64 68
65 } // namespace blink 69 } // namespace blink
66 70
67 #endif // PresentationReceiver_h 71 #endif // PresentationReceiver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698