| 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/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 17 #include "base/process/process_handle.h" | 17 #include "base/process/process_handle.h" |
| 18 #include "content/common/accessibility_mode_enums.h" | 18 #include "content/common/accessibility_mode_enums.h" |
| 19 #include "content/common/frame_message_enums.h" | 19 #include "content/common/frame_message_enums.h" |
| 20 #include "content/common/mojo/service_registry_impl.h" | 20 #include "content/common/mojo/service_registry_impl.h" |
| 21 #include "content/public/common/console_message_level.h" | 21 #include "content/public/common/console_message_level.h" |
| 22 #include "content/public/common/javascript_message_type.h" | 22 #include "content/public/common/javascript_message_type.h" |
| 23 #include "content/public/common/referrer.h" | 23 #include "content/public/common/referrer.h" |
| 24 #include "content/public/renderer/render_frame.h" | 24 #include "content/public/renderer/render_frame.h" |
| 25 #include "content/renderer/render_frame_proxy.h" | 25 #include "content/renderer/render_frame_proxy.h" |
| 26 #include "content/renderer/renderer_webcookiejar_impl.h" | 26 #include "content/renderer/renderer_webcookiejar_impl.h" |
| 27 #include "ipc/ipc_message.h" | 27 #include "ipc/ipc_message.h" |
| 28 #include "media/blink/webmediaplayer_delegate.h" | 28 #include "media/blink/webmediaplayer_delegate.h" |
| 29 #include "mojo/application/public/interfaces/service_provider.mojom.h" |
| 30 #include "mojo/application/public/interfaces/shell.mojom.h" |
| 29 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" | 31 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" |
| 30 #include "third_party/WebKit/public/web/WebAXObject.h" | 32 #include "third_party/WebKit/public/web/WebAXObject.h" |
| 31 #include "third_party/WebKit/public/web/WebDataSource.h" | 33 #include "third_party/WebKit/public/web/WebDataSource.h" |
| 32 #include "third_party/WebKit/public/web/WebFrameClient.h" | 34 #include "third_party/WebKit/public/web/WebFrameClient.h" |
| 33 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" | 35 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
| 34 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" | 36 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" |
| 35 #include "ui/gfx/range/range.h" | 37 #include "ui/gfx/range/range.h" |
| 36 | 38 |
| 37 #if defined(ENABLE_PLUGINS) | 39 #if defined(ENABLE_PLUGINS) |
| 38 #include "content/renderer/pepper/plugin_power_saver_helper.h" | 40 #include "content/renderer/pepper/plugin_power_saver_helper.h" |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 virtual bool enterFullscreen(); | 540 virtual bool enterFullscreen(); |
| 539 virtual bool exitFullscreen(); | 541 virtual bool exitFullscreen(); |
| 540 virtual blink::WebPermissionClient* permissionClient(); | 542 virtual blink::WebPermissionClient* permissionClient(); |
| 541 virtual blink::WebAppBannerClient* appBannerClient(); | 543 virtual blink::WebAppBannerClient* appBannerClient(); |
| 542 virtual void registerProtocolHandler(const blink::WebString& scheme, | 544 virtual void registerProtocolHandler(const blink::WebString& scheme, |
| 543 const blink::WebURL& url, | 545 const blink::WebURL& url, |
| 544 const blink::WebString& title); | 546 const blink::WebString& title); |
| 545 virtual void unregisterProtocolHandler(const blink::WebString& scheme, | 547 virtual void unregisterProtocolHandler(const blink::WebString& scheme, |
| 546 const blink::WebURL& url); | 548 const blink::WebURL& url); |
| 547 virtual blink::WebBluetooth* bluetooth(); | 549 virtual blink::WebBluetooth* bluetooth(); |
| 550 virtual blink::WebUSBClient* usbClient(); |
| 548 | 551 |
| 549 #if defined(ENABLE_WEBVR) | 552 #if defined(ENABLE_WEBVR) |
| 550 blink::WebVRClient* webVRClient() override; | 553 blink::WebVRClient* webVRClient() override; |
| 551 #endif | 554 #endif |
| 552 | 555 |
| 553 // WebMediaPlayerDelegate implementation: | 556 // WebMediaPlayerDelegate implementation: |
| 554 void DidPlay(blink::WebMediaPlayer* player) override; | 557 void DidPlay(blink::WebMediaPlayer* player) override; |
| 555 void DidPause(blink::WebMediaPlayer* player) override; | 558 void DidPause(blink::WebMediaPlayer* player) override; |
| 556 void PlayerGone(blink::WebMediaPlayer* player) override; | 559 void PlayerGone(blink::WebMediaPlayer* player) override; |
| 557 | 560 |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 media::interfaces::ServiceFactory* GetMediaServiceFactory(); | 826 media::interfaces::ServiceFactory* GetMediaServiceFactory(); |
| 824 | 827 |
| 825 // Called when a connection error happened on |media_service_factory_|. | 828 // Called when a connection error happened on |media_service_factory_|. |
| 826 void OnMediaServiceFactoryConnectionError(); | 829 void OnMediaServiceFactoryConnectionError(); |
| 827 #endif | 830 #endif |
| 828 | 831 |
| 829 media::CdmFactory* GetCdmFactory(); | 832 media::CdmFactory* GetCdmFactory(); |
| 830 | 833 |
| 831 void RegisterMojoServices(); | 834 void RegisterMojoServices(); |
| 832 | 835 |
| 836 // Connects to a Mojo application and returns a proxy to its exposed |
| 837 // ServiceProvider. |
| 838 mojo::ServiceProviderPtr ConnectToApplication(const GURL& url); |
| 839 |
| 833 // Stores the WebLocalFrame we are associated with. This is null from the | 840 // Stores the WebLocalFrame we are associated with. This is null from the |
| 834 // constructor until SetWebFrame is called, and it is null after | 841 // constructor until SetWebFrame is called, and it is null after |
| 835 // frameDetached is called until destruction (which is asynchronous in the | 842 // frameDetached is called until destruction (which is asynchronous in the |
| 836 // case of the main frame, but not subframes). | 843 // case of the main frame, but not subframes). |
| 837 blink::WebLocalFrame* frame_; | 844 blink::WebLocalFrame* frame_; |
| 838 | 845 |
| 839 // Boolean value indicating whether this RenderFrameImpl object is for a | 846 // Boolean value indicating whether this RenderFrameImpl object is for a |
| 840 // subframe or not. It remains accurate during destruction, even when |frame_| | 847 // subframe or not. It remains accurate during destruction, even when |frame_| |
| 841 // has been invalidated. | 848 // has been invalidated. |
| 842 bool is_subframe_; | 849 bool is_subframe_; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 | 985 |
| 979 // The push messaging dispatcher attached to this frame, lazily initialized. | 986 // The push messaging dispatcher attached to this frame, lazily initialized. |
| 980 PushMessagingDispatcher* push_messaging_dispatcher_; | 987 PushMessagingDispatcher* push_messaging_dispatcher_; |
| 981 | 988 |
| 982 // The presentation dispatcher implementation attached to this frame, lazily | 989 // The presentation dispatcher implementation attached to this frame, lazily |
| 983 // initialized. | 990 // initialized. |
| 984 PresentationDispatcher* presentation_dispatcher_; | 991 PresentationDispatcher* presentation_dispatcher_; |
| 985 | 992 |
| 986 ServiceRegistryImpl service_registry_; | 993 ServiceRegistryImpl service_registry_; |
| 987 | 994 |
| 995 // The shell proxy used to connect to Mojo applications. |
| 996 mojo::ShellPtr mojo_shell_; |
| 997 |
| 988 // The screen orientation dispatcher attached to the frame, lazily | 998 // The screen orientation dispatcher attached to the frame, lazily |
| 989 // initialized. | 999 // initialized. |
| 990 ScreenOrientationDispatcher* screen_orientation_dispatcher_; | 1000 ScreenOrientationDispatcher* screen_orientation_dispatcher_; |
| 991 | 1001 |
| 992 // The Manifest Manager handles the manifest requests from the browser | 1002 // The Manifest Manager handles the manifest requests from the browser |
| 993 // process. | 1003 // process. |
| 994 ManifestManager* manifest_manager_; | 1004 ManifestManager* manifest_manager_; |
| 995 | 1005 |
| 996 // The current accessibility mode. | 1006 // The current accessibility mode. |
| 997 AccessibilityMode accessibility_mode_; | 1007 AccessibilityMode accessibility_mode_; |
| 998 | 1008 |
| 999 // Only valid if |accessibility_mode_| is anything other than | 1009 // Only valid if |accessibility_mode_| is anything other than |
| 1000 // AccessibilityModeOff. | 1010 // AccessibilityModeOff. |
| 1001 RendererAccessibility* renderer_accessibility_; | 1011 RendererAccessibility* renderer_accessibility_; |
| 1002 | 1012 |
| 1003 scoped_ptr<PermissionDispatcher> permission_client_; | 1013 scoped_ptr<PermissionDispatcher> permission_client_; |
| 1004 | 1014 |
| 1005 scoped_ptr<blink::WebAppBannerClient> app_banner_client_; | 1015 scoped_ptr<blink::WebAppBannerClient> app_banner_client_; |
| 1006 | 1016 |
| 1007 scoped_ptr<blink::WebBluetooth> bluetooth_; | 1017 scoped_ptr<blink::WebBluetooth> bluetooth_; |
| 1008 | 1018 |
| 1019 scoped_ptr<blink::WebUSBClient> usb_client_; |
| 1020 |
| 1009 #if defined(ENABLE_WEBVR) | 1021 #if defined(ENABLE_WEBVR) |
| 1010 // The VR dispatcher attached to the frame, lazily initialized. | 1022 // The VR dispatcher attached to the frame, lazily initialized. |
| 1011 scoped_ptr<VRDispatcher> vr_dispatcher_; | 1023 scoped_ptr<VRDispatcher> vr_dispatcher_; |
| 1012 #endif | 1024 #endif |
| 1013 | 1025 |
| 1014 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1026 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 1015 // The external popup for the currently showing select popup. | 1027 // The external popup for the currently showing select popup. |
| 1016 scoped_ptr<ExternalPopupMenu> external_popup_menu_; | 1028 scoped_ptr<ExternalPopupMenu> external_popup_menu_; |
| 1017 #endif | 1029 #endif |
| 1018 | 1030 |
| 1019 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1031 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 1020 | 1032 |
| 1021 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1033 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 1022 }; | 1034 }; |
| 1023 | 1035 |
| 1024 } // namespace content | 1036 } // namespace content |
| 1025 | 1037 |
| 1026 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1038 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |