| 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/data_reduction_proxy_lofi_user_data.h" |
| 22 #include "content/public/common/javascript_message_type.h" | 23 #include "content/public/common/javascript_message_type.h" |
| 23 #include "content/public/common/referrer.h" | 24 #include "content/public/common/referrer.h" |
| 24 #include "content/public/renderer/render_frame.h" | 25 #include "content/public/renderer/render_frame.h" |
| 25 #include "content/renderer/render_frame_proxy.h" | 26 #include "content/renderer/render_frame_proxy.h" |
| 26 #include "content/renderer/renderer_webcookiejar_impl.h" | 27 #include "content/renderer/renderer_webcookiejar_impl.h" |
| 27 #include "ipc/ipc_message.h" | 28 #include "ipc/ipc_message.h" |
| 28 #include "media/blink/webmediaplayer_delegate.h" | 29 #include "media/blink/webmediaplayer_delegate.h" |
| 29 #include "media/blink/webmediaplayer_params.h" | 30 #include "media/blink/webmediaplayer_params.h" |
| 30 #include "mojo/application/public/interfaces/service_provider.mojom.h" | 31 #include "mojo/application/public/interfaces/service_provider.mojom.h" |
| 31 #include "mojo/application/public/interfaces/shell.mojom.h" | 32 #include "mojo/application/public/interfaces/shell.mojom.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 213 |
| 213 DevToolsAgent* devtools_agent() { return devtools_agent_; } | 214 DevToolsAgent* devtools_agent() { return devtools_agent_; } |
| 214 | 215 |
| 215 // This is called right after creation with the WebLocalFrame for this | 216 // This is called right after creation with the WebLocalFrame for this |
| 216 // RenderFrame. It must be called before Initialize. | 217 // RenderFrame. It must be called before Initialize. |
| 217 void SetWebFrame(blink::WebLocalFrame* web_frame); | 218 void SetWebFrame(blink::WebLocalFrame* web_frame); |
| 218 | 219 |
| 219 // This method must be called after the frame has been added to the frame | 220 // This method must be called after the frame has been added to the frame |
| 220 // tree. It creates all objects that depend on the frame being at its proper | 221 // tree. It creates all objects that depend on the frame being at its proper |
| 221 // spot. | 222 // spot. |
| 222 void Initialize(); | 223 void Initialize(LoFiState lofi_state = LOFI_DEFAULT); |
| 223 | 224 |
| 224 // Notifications from RenderWidget. | 225 // Notifications from RenderWidget. |
| 225 void WasHidden(); | 226 void WasHidden(); |
| 226 void WasShown(); | 227 void WasShown(); |
| 227 void WidgetWillClose(); | 228 void WidgetWillClose(); |
| 228 | 229 |
| 229 // Start/Stop loading notifications. | 230 // Start/Stop loading notifications. |
| 230 // TODO(nasko): Those are page-level methods at this time and come from | 231 // TODO(nasko): Those are page-level methods at this time and come from |
| 231 // WebViewClient. We should move them to be WebFrameClient calls and put | 232 // WebViewClient. We should move them to be WebFrameClient calls and put |
| 232 // logic in the browser side to balance starts/stops. | 233 // logic in the browser side to balance starts/stops. |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 bool IsFTPDirectoryListing() override; | 357 bool IsFTPDirectoryListing() override; |
| 357 void AttachGuest(int element_instance_id) override; | 358 void AttachGuest(int element_instance_id) override; |
| 358 void DetachGuest(int element_instance_id) override; | 359 void DetachGuest(int element_instance_id) override; |
| 359 void SetSelectedText(const base::string16& selection_text, | 360 void SetSelectedText(const base::string16& selection_text, |
| 360 size_t offset, | 361 size_t offset, |
| 361 const gfx::Range& range) override; | 362 const gfx::Range& range) override; |
| 362 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, | 363 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, |
| 363 v8::Local<v8::Context> context) override; | 364 v8::Local<v8::Context> context) override; |
| 364 void AddMessageToConsole(ConsoleMessageLevel level, | 365 void AddMessageToConsole(ConsoleMessageLevel level, |
| 365 const std::string& message) override; | 366 const std::string& message) override; |
| 367 bool IsLoFiOn() override; |
| 366 | 368 |
| 367 // blink::WebFrameClient implementation: | 369 // blink::WebFrameClient implementation: |
| 368 virtual blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame, | 370 virtual blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame, |
| 369 const blink::WebPluginParams& params); | 371 const blink::WebPluginParams& params); |
| 370 virtual blink::WebMediaPlayer* createMediaPlayer( | 372 virtual blink::WebMediaPlayer* createMediaPlayer( |
| 371 blink::WebLocalFrame* frame, | 373 blink::WebLocalFrame* frame, |
| 372 const blink::WebURL& url, | 374 const blink::WebURL& url, |
| 373 blink::WebMediaPlayerClient* client, | 375 blink::WebMediaPlayerClient* client, |
| 374 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, | 376 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, |
| 375 blink::WebContentDecryptionModule* initial_cdm); | 377 blink::WebContentDecryptionModule* initial_cdm); |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 RendererAccessibility* renderer_accessibility_; | 1023 RendererAccessibility* renderer_accessibility_; |
| 1022 | 1024 |
| 1023 scoped_ptr<PermissionDispatcher> permission_client_; | 1025 scoped_ptr<PermissionDispatcher> permission_client_; |
| 1024 | 1026 |
| 1025 scoped_ptr<blink::WebAppBannerClient> app_banner_client_; | 1027 scoped_ptr<blink::WebAppBannerClient> app_banner_client_; |
| 1026 | 1028 |
| 1027 scoped_ptr<blink::WebBluetooth> bluetooth_; | 1029 scoped_ptr<blink::WebBluetooth> bluetooth_; |
| 1028 | 1030 |
| 1029 scoped_ptr<blink::WebUSBClient> usb_client_; | 1031 scoped_ptr<blink::WebUSBClient> usb_client_; |
| 1030 | 1032 |
| 1033 // Whether or not to use Lo-Fi for this frame or let the browser decide. |
| 1034 LoFiState lofi_state_; |
| 1035 |
| 1031 #if defined(ENABLE_WEBVR) | 1036 #if defined(ENABLE_WEBVR) |
| 1032 // The VR dispatcher attached to the frame, lazily initialized. | 1037 // The VR dispatcher attached to the frame, lazily initialized. |
| 1033 scoped_ptr<VRDispatcher> vr_dispatcher_; | 1038 scoped_ptr<VRDispatcher> vr_dispatcher_; |
| 1034 #endif | 1039 #endif |
| 1035 | 1040 |
| 1036 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1041 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 1037 // The external popup for the currently showing select popup. | 1042 // The external popup for the currently showing select popup. |
| 1038 scoped_ptr<ExternalPopupMenu> external_popup_menu_; | 1043 scoped_ptr<ExternalPopupMenu> external_popup_menu_; |
| 1039 #endif | 1044 #endif |
| 1040 | 1045 |
| 1041 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1046 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 1042 | 1047 |
| 1043 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1048 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 1044 }; | 1049 }; |
| 1045 | 1050 |
| 1046 } // namespace content | 1051 } // namespace content |
| 1047 | 1052 |
| 1048 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1053 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |