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

Side by Side Diff: third_party/WebKit/Source/core/dom/MediaIPHManager.h

Issue 2943983003: chrome/blink: Add functionality for in-product help for media elements. (Closed)
Patch Set: Created 3 years, 6 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MediaIPHManager_h
6 #define MediaIPHManager_h
7
8 #include "core/CoreExport.h"
9 #include "platform/heap/GarbageCollected.h"
10 #include "platform/heap/Heap.h"
11 #include "platform/heap/Member.h"
12 #include "public/web/WebMediaIPH.h"
13
14 namespace blink {
15 class HTMLMediaElement;
16 class WebMediaIPH;
17
18 class CORE_EXPORT MediaIPHManager final
chrishtr 2017/06/23 00:39:44 I'm not so sure you need this class at all. Propos
Khushal 2017/06/23 02:11:06 The reason I put it on Document was because I thou
chrishtr 2017/06/27 18:22:20 That sounds like waiting for the browser to me...
Khushal 2017/06/28 05:32:38 Restructured like you suggested except the trackin
19 : public GarbageCollectedFinalized<MediaIPHManager>,
20 public WebMediaIPHClient {
21 public:
22 static MediaIPHManager* Create(std::unique_ptr<WebMediaIPH>);
23 ~MediaIPHManager();
24
25 DECLARE_TRACE();
26
27 bool IPHTriggerObservedOnElement(HTMLMediaElement&);
28 void LayoutUpdated();
29
30 private:
31 enum class IPHState { kShowing, kHideRequested, kNotShowing };
32
33 MediaIPHManager(std::unique_ptr<WebMediaIPH>);
34
35 // WebMediaIPHClient implementation.
36 void DidHideMediaIPHWidget() override;
37
38 WeakMember<HTMLMediaElement> active_element_;
39 std::unique_ptr<WebMediaIPH> media_iph_;
40 IPHState state_ = IPHState::kNotShowing;
41 };
42
43 } // namespace blink
44
45 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698