| OLD | NEW |
| 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/render_frame_proxy.h" | 21 #include "content/renderer/render_frame_proxy.h" |
| 22 #include "content/renderer/renderer_webcookiejar_impl.h" | 22 #include "content/renderer/renderer_webcookiejar_impl.h" |
| 23 #include "ipc/ipc_message.h" | 23 #include "ipc/ipc_message.h" |
| 24 #include "third_party/WebKit/public/web/WebDataSource.h" | 24 #include "third_party/WebKit/public/web/WebDataSource.h" |
| 25 #include "third_party/WebKit/public/web/WebFrameClient.h" | 25 #include "third_party/WebKit/public/web/WebFrameClient.h" |
| 26 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" | 26 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
| 27 #include "ui/gfx/range/range.h" | 27 #include "ui/gfx/range/range.h" |
| 28 | 28 |
| 29 #if defined(OS_ANDROID) |
| 30 #include "content/renderer/media/android/renderer_media_player_manager.h" |
| 31 #endif |
| 32 |
| 29 class TransportDIB; | 33 class TransportDIB; |
| 30 struct FrameMsg_BuffersSwapped_Params; | 34 struct FrameMsg_BuffersSwapped_Params; |
| 31 struct FrameMsg_CompositorFrameSwapped_Params; | 35 struct FrameMsg_CompositorFrameSwapped_Params; |
| 32 struct FrameMsg_Navigate_Params; | 36 struct FrameMsg_Navigate_Params; |
| 33 | 37 |
| 34 namespace blink { | 38 namespace blink { |
| 35 class WebGeolocationClient; | 39 class WebGeolocationClient; |
| 36 class WebInputEvent; | 40 class WebInputEvent; |
| 37 class WebMouseEvent; | 41 class WebMouseEvent; |
| 38 class WebContentDecryptionModule; | 42 class WebContentDecryptionModule; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 57 class MediaStreamClient; | 61 class MediaStreamClient; |
| 58 class NotificationProvider; | 62 class NotificationProvider; |
| 59 class PepperPluginInstanceImpl; | 63 class PepperPluginInstanceImpl; |
| 60 class RendererPpapiHost; | 64 class RendererPpapiHost; |
| 61 class RenderFrameObserver; | 65 class RenderFrameObserver; |
| 62 class RenderViewImpl; | 66 class RenderViewImpl; |
| 63 class RenderWidget; | 67 class RenderWidget; |
| 64 class RenderWidgetFullscreenPepper; | 68 class RenderWidgetFullscreenPepper; |
| 65 struct CustomContextMenuContext; | 69 struct CustomContextMenuContext; |
| 66 | 70 |
| 71 #if defined(OS_ANDROID) |
| 72 class RendererMediaPlayerManager; |
| 73 #endif |
| 74 |
| 67 class CONTENT_EXPORT RenderFrameImpl | 75 class CONTENT_EXPORT RenderFrameImpl |
| 68 : public RenderFrame, | 76 : public RenderFrame, |
| 69 NON_EXPORTED_BASE(public blink::WebFrameClient), | 77 NON_EXPORTED_BASE(public blink::WebFrameClient), |
| 70 NON_EXPORTED_BASE(public WebMediaPlayerDelegate) { | 78 NON_EXPORTED_BASE(public WebMediaPlayerDelegate) { |
| 71 public: | 79 public: |
| 72 // Creates a new RenderFrame. |render_view| is the RenderView object that this | 80 // Creates a new RenderFrame. |render_view| is the RenderView object that this |
| 73 // frame belongs to. | 81 // frame belongs to. |
| 74 // Callers *must* call |SetWebFrame| immediately after creation. | 82 // Callers *must* call |SetWebFrame| immediately after creation. |
| 75 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. | 83 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. |
| 76 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); | 84 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 bool InitializeMediaStreamClient(); | 525 bool InitializeMediaStreamClient(); |
| 518 | 526 |
| 519 blink::WebMediaPlayer* CreateWebMediaPlayerForMediaStream( | 527 blink::WebMediaPlayer* CreateWebMediaPlayerForMediaStream( |
| 520 const blink::WebURL& url, | 528 const blink::WebURL& url, |
| 521 blink::WebMediaPlayerClient* client); | 529 blink::WebMediaPlayerClient* client); |
| 522 | 530 |
| 523 #if defined(OS_ANDROID) | 531 #if defined(OS_ANDROID) |
| 524 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer( | 532 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer( |
| 525 const blink::WebURL& url, | 533 const blink::WebURL& url, |
| 526 blink::WebMediaPlayerClient* client); | 534 blink::WebMediaPlayerClient* client); |
| 535 |
| 536 RendererMediaPlayerManager* GetMediaPlayerManager(); |
| 527 #endif | 537 #endif |
| 528 | 538 |
| 529 // Stores the WebLocalFrame we are associated with. | 539 // Stores the WebLocalFrame we are associated with. |
| 530 blink::WebLocalFrame* frame_; | 540 blink::WebLocalFrame* frame_; |
| 531 | 541 |
| 532 base::WeakPtr<RenderViewImpl> render_view_; | 542 base::WeakPtr<RenderViewImpl> render_view_; |
| 533 int routing_id_; | 543 int routing_id_; |
| 534 bool is_swapped_out_; | 544 bool is_swapped_out_; |
| 535 // RenderFrameProxy exists only when is_swapped_out_ is true. | 545 // RenderFrameProxy exists only when is_swapped_out_ is true. |
| 536 // TODO(nasko): This can be removed once we don't have a swapped out state on | 546 // TODO(nasko): This can be removed once we don't have a swapped out state on |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 // along with the RenderFrame automatically. This is why we just store weak | 596 // along with the RenderFrame automatically. This is why we just store weak |
| 587 // references. | 597 // references. |
| 588 | 598 |
| 589 // Holds a reference to the service which provides desktop notifications. | 599 // Holds a reference to the service which provides desktop notifications. |
| 590 NotificationProvider* notification_provider_; | 600 NotificationProvider* notification_provider_; |
| 591 | 601 |
| 592 // MediaStreamClient attached to this frame; lazily initialized. | 602 // MediaStreamClient attached to this frame; lazily initialized. |
| 593 MediaStreamClient* media_stream_client_; | 603 MediaStreamClient* media_stream_client_; |
| 594 blink::WebUserMediaClient* web_user_media_client_; | 604 blink::WebUserMediaClient* web_user_media_client_; |
| 595 | 605 |
| 606 #if defined(OS_ANDROID) |
| 607 // Manages all media players in this render frame for communicating with the |
| 608 // real media player and CDM objects in the browser process. It's okay to use |
| 609 // raw pointers since it's a RenderFrameObserver. |
| 610 RendererMediaPlayerManager* media_player_manager_; |
| 611 #endif |
| 612 |
| 596 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 613 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 597 | 614 |
| 598 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 615 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 599 }; | 616 }; |
| 600 | 617 |
| 601 } // namespace content | 618 } // namespace content |
| 602 | 619 |
| 603 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 620 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |