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