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

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 278353003: Make RendererMediaPlayerManager a RenderFrameObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/id_map.h" 13 #include "base/id_map.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "base/process/process_handle.h" 16 #include "base/process/process_handle.h"
17 #include "content/public/common/javascript_message_type.h" 17 #include "content/public/common/javascript_message_type.h"
18 #include "content/public/common/referrer.h" 18 #include "content/public/common/referrer.h"
19 #include "content/public/renderer/render_frame.h" 19 #include "content/public/renderer/render_frame.h"
20 #include "content/renderer/media/webmediaplayer_delegate.h" 20 #include "content/renderer/media/webmediaplayer_delegate.h"
21 #include "content/renderer/renderer_webcookiejar_impl.h" 21 #include "content/renderer/renderer_webcookiejar_impl.h"
22 #include "ipc/ipc_message.h" 22 #include "ipc/ipc_message.h"
23 #include "third_party/WebKit/public/web/WebDataSource.h" 23 #include "third_party/WebKit/public/web/WebDataSource.h"
24 #include "third_party/WebKit/public/web/WebFrameClient.h" 24 #include "third_party/WebKit/public/web/WebFrameClient.h"
25 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" 25 #include "third_party/WebKit/public/web/WebHistoryCommitType.h"
26 #include "ui/gfx/range/range.h" 26 #include "ui/gfx/range/range.h"
27 27
28 #if defined(OS_ANDROID)
29 #include "content/renderer/media/android/renderer_media_player_manager.h"
30 #endif
31
28 class TransportDIB; 32 class TransportDIB;
29 struct FrameMsg_BuffersSwapped_Params; 33 struct FrameMsg_BuffersSwapped_Params;
30 struct FrameMsg_CompositorFrameSwapped_Params; 34 struct FrameMsg_CompositorFrameSwapped_Params;
31 struct FrameMsg_Navigate_Params; 35 struct FrameMsg_Navigate_Params;
32 36
33 namespace blink { 37 namespace blink {
34 class WebGeolocationClient; 38 class WebGeolocationClient;
35 class WebInputEvent; 39 class WebInputEvent;
36 class WebMouseEvent; 40 class WebMouseEvent;
37 class WebContentDecryptionModule; 41 class WebContentDecryptionModule;
(...skipping 18 matching lines...) Expand all
56 class MediaStreamClient; 60 class MediaStreamClient;
57 class NotificationProvider; 61 class NotificationProvider;
58 class PepperPluginInstanceImpl; 62 class PepperPluginInstanceImpl;
59 class RendererPpapiHost; 63 class RendererPpapiHost;
60 class RenderFrameObserver; 64 class RenderFrameObserver;
61 class RenderViewImpl; 65 class RenderViewImpl;
62 class RenderWidget; 66 class RenderWidget;
63 class RenderWidgetFullscreenPepper; 67 class RenderWidgetFullscreenPepper;
64 struct CustomContextMenuContext; 68 struct CustomContextMenuContext;
65 69
70 #if defined(OS_ANDROID)
71 class RendererMediaPlayerManager;
72 #endif
73
66 class CONTENT_EXPORT RenderFrameImpl 74 class CONTENT_EXPORT RenderFrameImpl
67 : public RenderFrame, 75 : public RenderFrame,
68 NON_EXPORTED_BASE(public blink::WebFrameClient), 76 NON_EXPORTED_BASE(public blink::WebFrameClient),
69 NON_EXPORTED_BASE(public WebMediaPlayerDelegate) { 77 NON_EXPORTED_BASE(public WebMediaPlayerDelegate) {
70 public: 78 public:
71 // Creates a new RenderFrame. |render_view| is the RenderView object that this 79 // Creates a new RenderFrame. |render_view| is the RenderView object that this
72 // frame belongs to. 80 // frame belongs to.
73 // Callers *must* call |SetWebFrame| immediately after creation. 81 // Callers *must* call |SetWebFrame| immediately after creation.
74 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. 82 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed.
75 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); 83 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id);
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 bool InitializeMediaStreamClient(); 499 bool InitializeMediaStreamClient();
492 500
493 blink::WebMediaPlayer* CreateWebMediaPlayerForMediaStream( 501 blink::WebMediaPlayer* CreateWebMediaPlayerForMediaStream(
494 const blink::WebURL& url, 502 const blink::WebURL& url,
495 blink::WebMediaPlayerClient* client); 503 blink::WebMediaPlayerClient* client);
496 504
497 #if defined(OS_ANDROID) 505 #if defined(OS_ANDROID)
498 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer( 506 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer(
499 const blink::WebURL& url, 507 const blink::WebURL& url,
500 blink::WebMediaPlayerClient* client); 508 blink::WebMediaPlayerClient* client);
509
510 RendererMediaPlayerManager* GetMediaPlayerManager();
501 #endif 511 #endif
502 512
503 // Stores the WebLocalFrame we are associated with. 513 // Stores the WebLocalFrame we are associated with.
504 blink::WebLocalFrame* frame_; 514 blink::WebLocalFrame* frame_;
505 515
506 base::WeakPtr<RenderViewImpl> render_view_; 516 base::WeakPtr<RenderViewImpl> render_view_;
507 int routing_id_; 517 int routing_id_;
508 bool is_swapped_out_; 518 bool is_swapped_out_;
509 bool is_detaching_; 519 bool is_detaching_;
510 520
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 // along with the RenderFrame automatically. This is why we just store weak 566 // along with the RenderFrame automatically. This is why we just store weak
557 // references. 567 // references.
558 568
559 // Holds a reference to the service which provides desktop notifications. 569 // Holds a reference to the service which provides desktop notifications.
560 NotificationProvider* notification_provider_; 570 NotificationProvider* notification_provider_;
561 571
562 // MediaStreamClient attached to this frame; lazily initialized. 572 // MediaStreamClient attached to this frame; lazily initialized.
563 MediaStreamClient* media_stream_client_; 573 MediaStreamClient* media_stream_client_;
564 blink::WebUserMediaClient* web_user_media_client_; 574 blink::WebUserMediaClient* web_user_media_client_;
565 575
576 #if defined(OS_ANDROID)
577 // Manages all media players in this render frame for communicating with the
578 // real media player and CDM objects in the browser process. It's okay to use
579 // raw pointers since it's a RenderFrameObserver.
580 RendererMediaPlayerManager* media_player_manager_;
581 #endif
582
566 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 583 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
567 584
568 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 585 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
569 }; 586 };
570 587
571 } // namespace content 588 } // namespace content
572 589
573 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 590 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698