Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 CONTENT_BROWSER_MEDIA_SESSION_PEPPER_WEB_CONTENTS_OBSERVER_H_ | |
| 6 #define CONTENT_BROWSER_MEDIA_SESSION_PEPPER_WEB_CONTENTS_OBSERVER_H_ | |
| 7 | |
| 8 #include "content/public/browser/web_contents_observer.h" | |
| 9 | |
| 10 #include <map> | |
| 11 #include <memory> | |
| 12 #include <set> | |
| 13 | |
| 14 namespace content { | |
| 15 | |
| 16 class PepperPlayerDelegate; | |
| 17 class MediaSession; | |
| 18 | |
| 19 class PepperWebContentsObserver : public WebContentsObserver { | |
| 20 public: | |
| 21 explicit PepperWebContentsObserver(WebContents* web_contents); | |
| 22 ~PepperWebContentsObserver() override; | |
| 23 | |
| 24 void WebContentsDestroyed() override; | |
|
jochen (gone - plz use gerrit)
2016/06/27 11:47:11
// WebContentsObserver implementation.
Zhiqiang Zhang (Slow)
2016/06/28 18:53:24
Done.
| |
| 25 void PepperInstanceCreated(int32_t pp_instance) override; | |
| 26 void PepperInstanceDeleted(int32_t pp_instance) override; | |
| 27 | |
| 28 bool OnMessageReceived(const IPC::Message& msg, | |
| 29 RenderFrameHost* render_frame_host) override; | |
| 30 void OnPepperStartsPlayback(int32_t pp_instance); | |
|
jochen (gone - plz use gerrit)
2016/06/27 11:47:11
this is no longer WCO, please move to a separate b
Zhiqiang Zhang (Slow)
2016/06/28 18:53:24
Done.
| |
| 31 void OnPepperStopsPlayback(int32_t pp_instance); | |
| 32 | |
| 33 private: | |
| 34 | |
| 35 using PlayersMap = | |
| 36 std::map<int32_t, std::unique_ptr<PepperPlayerDelegate>>; | |
|
jochen (gone - plz use gerrit)
2016/06/27 11:47:11
base::IdMap?
Zhiqiang Zhang (Slow)
2016/06/28 18:53:24
Done.
| |
| 37 PlayersMap players_map_; | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(PepperWebContentsObserver); | |
| 40 }; | |
| 41 | |
| 42 } // namespace content | |
| 43 | |
| 44 #endif // CONTENT_BROWSER_MEDIA_SESSION_PEPPER_WEB_CONTENTS_OBSERVER_H_ | |
| OLD | NEW |