OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 CHROME_RENDERER_PRERENDER_PRERENDER_WEBMEDIAPLAYER_H_ |
| 6 #define CHROME_RENDERER_PRERENDER_PRERENDER_WEBMEDIAPLAYER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/public/renderer/render_view_observer.h" |
| 11 #include "webkit/glue/webmediaplayer_impl.h" |
| 12 |
| 13 namespace webkit_glue { |
| 14 class MediaStreamClient; |
| 15 } |
| 16 |
| 17 namespace prerender { |
| 18 |
| 19 class PrerenderWebMediaPlayer |
| 20 : public content::RenderViewObserver, |
| 21 public webkit_glue::WebMediaPlayerImpl { |
| 22 public: |
| 23 PrerenderWebMediaPlayer(RenderView* render_view, |
| 24 WebKit::WebMediaPlayerClient* client, |
| 25 media::FilterCollection* collection, |
| 26 media::MessageLoopFactory* message_loop_factory, |
| 27 webkit_glue::MediaStreamClient* media_stream_client, |
| 28 media::MediaLog* media_log); |
| 29 virtual ~PrerenderWebMediaPlayer(); |
| 30 |
| 31 // WebMediaPlayer methods: |
| 32 virtual void load(const WebKit::WebURL& url) OVERRIDE; |
| 33 virtual void cancelLoad() OVERRIDE; |
| 34 |
| 35 private: |
| 36 // RenderViewObserver method: |
| 37 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 38 |
| 39 virtual void OnSetIsPrerendering(bool is_prerendering); |
| 40 |
| 41 bool is_prerendering_; |
| 42 scoped_ptr<WebKit::WebURL> url_to_load_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(PrerenderWebMediaPlayer); |
| 45 }; |
| 46 |
| 47 } // namespace prerender |
| 48 |
| 49 #endif // CHROME_RENDERER_PRERENDER_PRERENDER_WEBMEDIAPLAYER_H_ |
OLD | NEW |