Chromium Code Reviews| Index: content/browser/media/pepper/pepper_web_contents_observer.h |
| diff --git a/content/browser/media/pepper/pepper_web_contents_observer.h b/content/browser/media/pepper/pepper_web_contents_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..563f98b2fee355bc91f001428777fc94f739c63f |
| --- /dev/null |
| +++ b/content/browser/media/pepper/pepper_web_contents_observer.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_RENDER_PEPPER_PEPPER_WEB_CONTENTS_OBSERVER_H_ |
| +#define CONTENT_RENDER_PEPPER_PEPPER_WEB_CONTENTS_OBSERVER_H_ |
| + |
| +#include "content/public/browser/web_contents_observer.h" |
| + |
| +#include <map> |
| +#include <memory> |
| + |
| +namespace content { |
| +class PepperPlayerDelegate; |
|
mlamouri (slow - plz ping)
2016/06/23 13:23:20
style: leave empty line above.
Zhiqiang Zhang (Slow)
2016/06/24 17:43:20
Done.
|
| +class MediaSession; |
| + |
| +class CONTENT_EXPORT PepperWebContentsObserver : public WebContentsObserver { |
|
mlamouri (slow - plz ping)
2016/06/23 13:23:20
Why CONTENT_EXPORT?
Zhiqiang Zhang (Slow)
2016/06/24 17:43:20
Removed.
|
| + public: |
| + explicit PepperWebContentsObserver(WebContents* web_contents); |
| + ~PepperWebContentsObserver() override; |
| + |
| + void WebContentsDestroyed() override; |
| + void PepperInstanceCreated(int32_t pp_instance) override; |
| + void PepperInstanceDeleted(int32_t pp_instance) override; |
| + bool OnMessageReceived(const IPC::Message& msg, |
| + RenderFrameHost* render_frame_host) override; |
| + void OnPepperStartsPlayback(int32_t pp_instance); |
| + void OnPepperStopsPlayback(int32_t pp_instance); |
| + |
| + private: |
| + |
| + using PlayersMap = |
| + std::map<int32_t, std::unique_ptr<PepperPlayerDelegate>>; |
| + PlayersMap players_map_; |
| + MediaSession* media_session_; |
|
mlamouri (slow - plz ping)
2016/06/23 13:23:20
FWIW, I don't think you need this. You could as we
Zhiqiang Zhang (Slow)
2016/06/24 17:43:21
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(PepperWebContentsObserver); |
| +}; |
| +} |
|
mlamouri (slow - plz ping)
2016/06/23 13:23:20
style: add empty line above and " // namespace co
Zhiqiang Zhang (Slow)
2016/06/24 17:43:21
Done.
|
| + |
| +#endif // CONTENT_RENDER_PEPPER_PEPPER_WEB_CONTENTS_OBSERVER_H_ |