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

Side by Side Diff: third_party/WebKit/Source/modules/media_controls/MediaDownloadInProductHelpManager.h

Issue 2943983003: chrome/blink: Add functionality for in-product help for media elements. (Closed)
Patch Set: move IPH to MediaDownloadInProductManager Created 3 years, 4 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 MediaDownloadInProductHelpManager_h
6 #define MediaDownloadInProductHelpManager_h
7
8 #include <memory>
9
10 #include "modules/ModulesExport.h"
11 #include "platform/heap/GarbageCollected.h"
12 #include "platform/heap/Heap.h"
13 #include "platform/heap/Member.h"
14 #include "public/platform/media_download_in_product_help.mojom-blink.h"
15
16 namespace blink {
17 class MediaControlsImpl;
18
19 class MODULES_EXPORT MediaDownloadInProductHelpManager final
20 : public GarbageCollectedFinalized<MediaDownloadInProductHelpManager> {
21 WTF_MAKE_NONCOPYABLE(MediaDownloadInProductHelpManager);
22
23 public:
24 MediaDownloadInProductHelpManager(MediaControlsImpl&);
25 virtual ~MediaDownloadInProductHelpManager();
26
27 void SetControlsState(bool can_show);
28 void SetDownloadButtonState(bool can_show);
29 void SetPlayState(bool is_playing);
30 bool IsShowingInProductHelp() const;
31
32 DECLARE_VIRTUAL_TRACE();
33
34 private:
35 void StateUpdated();
36 bool CanShowInProductHelp() const;
37 void MaybeDispatchDownloadInProductHelpTrigger();
38 void DismissInProductHelp();
39
40 Member<MediaControlsImpl> controls_;
41
42 bool controls_can_show_ = false;
43 bool button_can_show_ = false;
44 bool is_playing_ = false;
45 bool media_download_in_product_trigger_observed_ = false;
46
47 std::unique_ptr<mojom::blink::MediaDownloadInProductHelpPtr>
48 media_in_product_help_;
49 };
50
51 } // namespace blink
52
53 #endif // MediaDownloadInProductHelpManager_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698