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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 DevToolsAgent* devtools_agent() { return devtools_agent_; } | 219 DevToolsAgent* devtools_agent() { return devtools_agent_; } |
220 | 220 |
221 // This is called right after creation with the WebLocalFrame for this | 221 // This is called right after creation with the WebLocalFrame for this |
222 // RenderFrame. It must be called before Initialize. | 222 // RenderFrame. It must be called before Initialize. |
223 void SetWebFrame(blink::WebLocalFrame* web_frame); | 223 void SetWebFrame(blink::WebLocalFrame* web_frame); |
224 | 224 |
225 // This method must be called after the frame has been added to the frame | 225 // This method must be called after the frame has been added to the frame |
226 // tree. It creates all objects that depend on the frame being at its proper | 226 // tree. It creates all objects that depend on the frame being at its proper |
227 // spot. | 227 // spot. |
228 void Initialize(); | 228 void Initialize(bool is_using_lofi = false); |
229 | 229 |
230 // Notifications from RenderWidget. | 230 // Notifications from RenderWidget. |
231 void WasHidden(); | 231 void WasHidden(); |
232 void WasShown(); | 232 void WasShown(); |
233 void WidgetWillClose(); | 233 void WidgetWillClose(); |
234 | 234 |
235 // Start/Stop loading notifications. | 235 // Start/Stop loading notifications. |
236 // TODO(nasko): Those are page-level methods at this time and come from | 236 // TODO(nasko): Those are page-level methods at this time and come from |
237 // WebViewClient. We should move them to be WebFrameClient calls and put | 237 // WebViewClient. We should move them to be WebFrameClient calls and put |
238 // logic in the browser side to balance starts/stops. | 238 // logic in the browser side to balance starts/stops. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 bool IsFTPDirectoryListing() override; | 363 bool IsFTPDirectoryListing() override; |
364 void AttachGuest(int element_instance_id) override; | 364 void AttachGuest(int element_instance_id) override; |
365 void DetachGuest(int element_instance_id) override; | 365 void DetachGuest(int element_instance_id) override; |
366 void SetSelectedText(const base::string16& selection_text, | 366 void SetSelectedText(const base::string16& selection_text, |
367 size_t offset, | 367 size_t offset, |
368 const gfx::Range& range) override; | 368 const gfx::Range& range) override; |
369 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, | 369 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, |
370 v8::Local<v8::Context> context) override; | 370 v8::Local<v8::Context> context) override; |
371 void AddMessageToConsole(ConsoleMessageLevel level, | 371 void AddMessageToConsole(ConsoleMessageLevel level, |
372 const std::string& message) override; | 372 const std::string& message) override; |
| 373 bool IsUsingLoFi() override; |
373 | 374 |
374 // blink::WebFrameClient implementation: | 375 // blink::WebFrameClient implementation: |
375 blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame, | 376 blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame, |
376 const blink::WebPluginParams& params) override; | 377 const blink::WebPluginParams& params) override; |
377 blink::WebMediaPlayer* createMediaPlayer( | 378 blink::WebMediaPlayer* createMediaPlayer( |
378 blink::WebLocalFrame* frame, | 379 blink::WebLocalFrame* frame, |
379 const blink::WebURL& url, | 380 const blink::WebURL& url, |
380 blink::WebMediaPlayerClient* client, | 381 blink::WebMediaPlayerClient* client, |
381 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, | 382 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, |
382 blink::WebContentDecryptionModule* initial_cdm) override; | 383 blink::WebContentDecryptionModule* initial_cdm) override; |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 RendererAccessibility* renderer_accessibility_; | 1045 RendererAccessibility* renderer_accessibility_; |
1045 | 1046 |
1046 scoped_ptr<PermissionDispatcher> permission_client_; | 1047 scoped_ptr<PermissionDispatcher> permission_client_; |
1047 | 1048 |
1048 scoped_ptr<blink::WebAppBannerClient> app_banner_client_; | 1049 scoped_ptr<blink::WebAppBannerClient> app_banner_client_; |
1049 | 1050 |
1050 scoped_ptr<blink::WebBluetooth> bluetooth_; | 1051 scoped_ptr<blink::WebBluetooth> bluetooth_; |
1051 | 1052 |
1052 scoped_ptr<blink::WebUSBClient> usb_client_; | 1053 scoped_ptr<blink::WebUSBClient> usb_client_; |
1053 | 1054 |
| 1055 // Whether or not to use Lo-Fi for this frame. |
| 1056 bool is_using_lofi_; |
| 1057 |
1054 #if defined(ENABLE_WEBVR) | 1058 #if defined(ENABLE_WEBVR) |
1055 // The VR dispatcher attached to the frame, lazily initialized. | 1059 // The VR dispatcher attached to the frame, lazily initialized. |
1056 scoped_ptr<VRDispatcher> vr_dispatcher_; | 1060 scoped_ptr<VRDispatcher> vr_dispatcher_; |
1057 #endif | 1061 #endif |
1058 | 1062 |
1059 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1063 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
1060 // The external popup for the currently showing select popup. | 1064 // The external popup for the currently showing select popup. |
1061 scoped_ptr<ExternalPopupMenu> external_popup_menu_; | 1065 scoped_ptr<ExternalPopupMenu> external_popup_menu_; |
1062 #endif | 1066 #endif |
1063 | 1067 |
1064 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1068 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
1065 | 1069 |
1066 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1070 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
1067 }; | 1071 }; |
1068 | 1072 |
1069 } // namespace content | 1073 } // namespace content |
1070 | 1074 |
1071 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1075 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |