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/common/mojo/service_registry_impl.h" |
17 #include "content/public/common/javascript_message_type.h" | 18 #include "content/public/common/javascript_message_type.h" |
18 #include "content/public/common/referrer.h" | 19 #include "content/public/common/referrer.h" |
19 #include "content/public/renderer/render_frame.h" | 20 #include "content/public/renderer/render_frame.h" |
20 #include "content/renderer/media/webmediaplayer_delegate.h" | 21 #include "content/renderer/media/webmediaplayer_delegate.h" |
21 #include "content/renderer/render_frame_proxy.h" | 22 #include "content/renderer/render_frame_proxy.h" |
22 #include "content/renderer/renderer_webcookiejar_impl.h" | 23 #include "content/renderer/renderer_webcookiejar_impl.h" |
23 #include "ipc/ipc_message.h" | 24 #include "ipc/ipc_message.h" |
24 #include "third_party/WebKit/public/web/WebDataSource.h" | 25 #include "third_party/WebKit/public/web/WebDataSource.h" |
25 #include "third_party/WebKit/public/web/WebFrameClient.h" | 26 #include "third_party/WebKit/public/web/WebFrameClient.h" |
26 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" | 27 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 virtual blink::WebNode GetContextMenuNode() const OVERRIDE; | 218 virtual blink::WebNode GetContextMenuNode() const OVERRIDE; |
218 virtual blink::WebPlugin* CreatePlugin( | 219 virtual blink::WebPlugin* CreatePlugin( |
219 blink::WebFrame* frame, | 220 blink::WebFrame* frame, |
220 const WebPluginInfo& info, | 221 const WebPluginInfo& info, |
221 const blink::WebPluginParams& params) OVERRIDE; | 222 const blink::WebPluginParams& params) OVERRIDE; |
222 virtual void LoadURLExternally(blink::WebLocalFrame* frame, | 223 virtual void LoadURLExternally(blink::WebLocalFrame* frame, |
223 const blink::WebURLRequest& request, | 224 const blink::WebURLRequest& request, |
224 blink::WebNavigationPolicy policy) OVERRIDE; | 225 blink::WebNavigationPolicy policy) OVERRIDE; |
225 virtual void ExecuteJavaScript(const base::string16& javascript) OVERRIDE; | 226 virtual void ExecuteJavaScript(const base::string16& javascript) OVERRIDE; |
226 virtual bool IsHidden() OVERRIDE; | 227 virtual bool IsHidden() OVERRIDE; |
| 228 virtual ServiceRegistry* GetServiceRegistry() OVERRIDE; |
227 | 229 |
228 // blink::WebFrameClient implementation: | 230 // blink::WebFrameClient implementation: |
229 virtual blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame, | 231 virtual blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame, |
230 const blink::WebPluginParams& params); | 232 const blink::WebPluginParams& params); |
231 virtual blink::WebMediaPlayer* createMediaPlayer( | 233 virtual blink::WebMediaPlayer* createMediaPlayer( |
232 blink::WebLocalFrame* frame, | 234 blink::WebLocalFrame* frame, |
233 const blink::WebURL& url, | 235 const blink::WebURL& url, |
234 blink::WebMediaPlayerClient* client); | 236 blink::WebMediaPlayerClient* client); |
235 virtual blink::WebContentDecryptionModule* createContentDecryptionModule( | 237 virtual blink::WebContentDecryptionModule* createContentDecryptionModule( |
236 blink::WebLocalFrame* frame, | 238 blink::WebLocalFrame* frame, |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 | 393 |
392 // WebMediaPlayerDelegate implementation: | 394 // WebMediaPlayerDelegate implementation: |
393 virtual void DidPlay(blink::WebMediaPlayer* player) OVERRIDE; | 395 virtual void DidPlay(blink::WebMediaPlayer* player) OVERRIDE; |
394 virtual void DidPause(blink::WebMediaPlayer* player) OVERRIDE; | 396 virtual void DidPause(blink::WebMediaPlayer* player) OVERRIDE; |
395 virtual void PlayerGone(blink::WebMediaPlayer* player) OVERRIDE; | 397 virtual void PlayerGone(blink::WebMediaPlayer* player) OVERRIDE; |
396 | 398 |
397 // TODO(nasko): Make all tests in RenderViewImplTest friends and then move | 399 // TODO(nasko): Make all tests in RenderViewImplTest friends and then move |
398 // this back to private member. | 400 // this back to private member. |
399 void OnNavigate(const FrameMsg_Navigate_Params& params); | 401 void OnNavigate(const FrameMsg_Navigate_Params& params); |
400 | 402 |
| 403 // Binds this render frame's service registry to a handle to the remote |
| 404 // service registry. |
| 405 void BindServiceRegistry( |
| 406 mojo::ScopedMessagePipeHandle service_provider_handle); |
| 407 |
401 protected: | 408 protected: |
402 RenderFrameImpl(RenderViewImpl* render_view, int32 routing_id); | 409 RenderFrameImpl(RenderViewImpl* render_view, int32 routing_id); |
403 | 410 |
404 private: | 411 private: |
405 friend class RenderFrameObserver; | 412 friend class RenderFrameObserver; |
406 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest, | 413 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest, |
407 AccessibilityMessagesQueueWhileSwappedOut); | 414 AccessibilityMessagesQueueWhileSwappedOut); |
408 FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest, | 415 FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest, |
409 ShouldUpdateSelectionTextFromContextMenuParams); | 416 ShouldUpdateSelectionTextFromContextMenuParams); |
410 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 417 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 #if defined(ENABLE_BROWSER_CDMS) | 630 #if defined(ENABLE_BROWSER_CDMS) |
624 // Manage all CDMs in this render frame for communicating with the real CDM in | 631 // Manage all CDMs in this render frame for communicating with the real CDM in |
625 // the browser process. It's okay to use a raw pointer since it's a | 632 // the browser process. It's okay to use a raw pointer since it's a |
626 // RenderFrameObserver. | 633 // RenderFrameObserver. |
627 RendererCdmManager* cdm_manager_; | 634 RendererCdmManager* cdm_manager_; |
628 #endif | 635 #endif |
629 | 636 |
630 // The geolocation dispatcher attached to this view, lazily initialized. | 637 // The geolocation dispatcher attached to this view, lazily initialized. |
631 GeolocationDispatcher* geolocation_dispatcher_; | 638 GeolocationDispatcher* geolocation_dispatcher_; |
632 | 639 |
| 640 ServiceRegistryImpl service_registry_; |
| 641 |
633 // The screen orientation dispatcher attached to the view, lazily initialized. | 642 // The screen orientation dispatcher attached to the view, lazily initialized. |
634 ScreenOrientationDispatcher* screen_orientation_dispatcher_; | 643 ScreenOrientationDispatcher* screen_orientation_dispatcher_; |
635 | 644 |
636 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 645 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
637 | 646 |
638 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 647 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
639 }; | 648 }; |
640 | 649 |
641 } // namespace content | 650 } // namespace content |
642 | 651 |
643 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 652 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |