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" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 namespace gfx { | 51 namespace gfx { |
52 class Point; | 52 class Point; |
53 class Range; | 53 class Range; |
54 class Rect; | 54 class Rect; |
55 } | 55 } |
56 | 56 |
57 namespace content { | 57 namespace content { |
58 | 58 |
59 class ChildFrameCompositingHelper; | 59 class ChildFrameCompositingHelper; |
60 class GeolocationDispatcher; | 60 class GeolocationDispatcher; |
| 61 class MediaStreamDispatcher; |
| 62 class MediaStreamImpl; |
61 class MediaStreamRendererFactory; | 63 class MediaStreamRendererFactory; |
62 class MidiDispatcher; | 64 class MidiDispatcher; |
63 class NotificationProvider; | 65 class NotificationProvider; |
64 class PepperPluginInstanceImpl; | 66 class PepperPluginInstanceImpl; |
65 class PushMessagingDispatcher; | 67 class PushMessagingDispatcher; |
66 class RendererCdmManager; | 68 class RendererCdmManager; |
67 class RendererMediaPlayerManager; | 69 class RendererMediaPlayerManager; |
68 class RendererPpapiHost; | 70 class RendererPpapiHost; |
69 class RenderFrameObserver; | 71 class RenderFrameObserver; |
70 class RenderViewImpl; | 72 class RenderViewImpl; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 const base::string16& text, | 196 const base::string16& text, |
195 const std::vector<blink::WebCompositionUnderline>& underlines, | 197 const std::vector<blink::WebCompositionUnderline>& underlines, |
196 int selection_start, | 198 int selection_start, |
197 int selection_end); | 199 int selection_end); |
198 void OnImeConfirmComposition( | 200 void OnImeConfirmComposition( |
199 const base::string16& text, | 201 const base::string16& text, |
200 const gfx::Range& replacement_range, | 202 const gfx::Range& replacement_range, |
201 bool keep_selection); | 203 bool keep_selection); |
202 #endif // ENABLE_PLUGINS | 204 #endif // ENABLE_PLUGINS |
203 | 205 |
| 206 // May return NULL in some cases, especially if userMediaClient() returns |
| 207 // NULL. |
| 208 MediaStreamDispatcher* GetMediaStreamDispatcher(); |
| 209 |
204 // IPC::Sender | 210 // IPC::Sender |
205 virtual bool Send(IPC::Message* msg) OVERRIDE; | 211 virtual bool Send(IPC::Message* msg) OVERRIDE; |
206 | 212 |
207 // IPC::Listener | 213 // IPC::Listener |
208 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 214 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
209 | 215 |
210 // RenderFrame implementation: | 216 // RenderFrame implementation: |
211 virtual RenderView* GetRenderView() OVERRIDE; | 217 virtual RenderView* GetRenderView() OVERRIDE; |
212 virtual int GetRoutingID() OVERRIDE; | 218 virtual int GetRoutingID() OVERRIDE; |
213 virtual blink::WebFrame* GetWebFrame() OVERRIDE; | 219 virtual blink::WebFrame* GetWebFrame() OVERRIDE; |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 const base::string16& message, | 527 const base::string16& message, |
522 const base::string16& default_value, | 528 const base::string16& default_value, |
523 const GURL& frame_url, | 529 const GURL& frame_url, |
524 base::string16* result); | 530 base::string16* result); |
525 | 531 |
526 // Loads the appropriate error page for the specified failure into the frame. | 532 // Loads the appropriate error page for the specified failure into the frame. |
527 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request, | 533 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request, |
528 const blink::WebURLError& error, | 534 const blink::WebURLError& error, |
529 bool replace); | 535 bool replace); |
530 | 536 |
531 // Initializes |web_user_media_client_|, returning true if successful. Returns | 537 // Initializes |web_user_media_client_|. If this fails, because it wasn't |
532 // false if it wasn't possible to create a MediaStreamClient (e.g., WebRTC is | 538 // possible to create a MediaStreamClient (e.g., WebRTC is disabled), then |
533 // disabled) in which case |web_user_media_client_| is NULL. | 539 // |web_user_media_client_| will remain NULL. |
534 bool InitializeUserMediaClient(); | 540 void InitializeUserMediaClient(); |
535 | 541 |
536 blink::WebMediaPlayer* CreateWebMediaPlayerForMediaStream( | 542 blink::WebMediaPlayer* CreateWebMediaPlayerForMediaStream( |
537 const blink::WebURL& url, | 543 const blink::WebURL& url, |
538 blink::WebMediaPlayerClient* client); | 544 blink::WebMediaPlayerClient* client); |
539 | 545 |
540 // Creates a factory object used for creating audio and video renderers. | 546 // Creates a factory object used for creating audio and video renderers. |
541 // The method is virtual so that layouttests can override it. | 547 // The method is virtual so that layouttests can override it. |
542 virtual scoped_ptr<MediaStreamRendererFactory> CreateRendererFactory(); | 548 virtual scoped_ptr<MediaStreamRendererFactory> CreateRendererFactory(); |
543 | 549 |
544 // Returns the URL being loaded by the |frame_|'s request. | 550 // Returns the URL being loaded by the |frame_|'s request. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 // of handling a InputMsg_SelectRange IPC. | 618 // of handling a InputMsg_SelectRange IPC. |
613 bool handling_select_range_; | 619 bool handling_select_range_; |
614 | 620 |
615 // The next group of objects all implement RenderFrameObserver, so are deleted | 621 // The next group of objects all implement RenderFrameObserver, so are deleted |
616 // along with the RenderFrame automatically. This is why we just store weak | 622 // along with the RenderFrame automatically. This is why we just store weak |
617 // references. | 623 // references. |
618 | 624 |
619 // Holds a reference to the service which provides desktop notifications. | 625 // Holds a reference to the service which provides desktop notifications. |
620 NotificationProvider* notification_provider_; | 626 NotificationProvider* notification_provider_; |
621 | 627 |
622 blink::WebUserMediaClient* web_user_media_client_; | 628 // Destroyed via the RenderFrameObserver::OnDestruct() mechanism. |
| 629 MediaStreamImpl* web_user_media_client_; |
623 | 630 |
624 // MidiClient attached to this frame; lazily initialized. | 631 // MidiClient attached to this frame; lazily initialized. |
625 MidiDispatcher* midi_dispatcher_; | 632 MidiDispatcher* midi_dispatcher_; |
626 | 633 |
627 #if defined(OS_ANDROID) | 634 #if defined(OS_ANDROID) |
628 // Manages all media players in this render frame for communicating with the | 635 // Manages all media players in this render frame for communicating with the |
629 // real media player in the browser process. It's okay to use a raw pointer | 636 // real media player in the browser process. It's okay to use a raw pointer |
630 // since it's a RenderFrameObserver. | 637 // since it's a RenderFrameObserver. |
631 RendererMediaPlayerManager* media_player_manager_; | 638 RendererMediaPlayerManager* media_player_manager_; |
632 #endif | 639 #endif |
(...skipping 24 matching lines...) Expand all Loading... |
657 ScreenOrientationDispatcher* screen_orientation_dispatcher_; | 664 ScreenOrientationDispatcher* screen_orientation_dispatcher_; |
658 | 665 |
659 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 666 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
660 | 667 |
661 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 668 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
662 }; | 669 }; |
663 | 670 |
664 } // namespace content | 671 } // namespace content |
665 | 672 |
666 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 673 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |