| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
| 17 #include "base/id_map.h" | 17 #include "base/id_map.h" |
| 18 #include "base/macros.h" | 18 #include "base/macros.h" |
| 19 #include "base/memory/linked_ptr.h" | 19 #include "base/memory/linked_ptr.h" |
| 20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
| 21 #include "base/observer_list.h" | 21 #include "base/observer_list.h" |
| 22 #include "base/process/process_handle.h" | 22 #include "base/process/process_handle.h" |
| 23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
| 24 #include "content/common/accessibility_mode_enums.h" | 24 #include "content/common/accessibility_mode_enums.h" |
| 25 #include "content/common/frame_host.mojom.h" | |
| 26 #include "content/common/frame_message_enums.h" | 25 #include "content/common/frame_message_enums.h" |
| 27 #include "content/common/mojo/service_registry_impl.h" | 26 #include "content/common/mojo/service_registry_impl.h" |
| 28 #include "content/public/common/console_message_level.h" | 27 #include "content/public/common/console_message_level.h" |
| 29 #include "content/public/common/javascript_message_type.h" | 28 #include "content/public/common/javascript_message_type.h" |
| 30 #include "content/public/common/referrer.h" | 29 #include "content/public/common/referrer.h" |
| 31 #include "content/public/common/stop_find_action.h" | 30 #include "content/public/common/stop_find_action.h" |
| 32 #include "content/public/renderer/render_frame.h" | 31 #include "content/public/renderer/render_frame.h" |
| 33 #include "content/renderer/frame_blame_context.h" | 32 #include "content/renderer/frame_blame_context.h" |
| 34 #include "content/renderer/mojo/blink_service_registry_impl.h" | 33 #include "content/renderer/mojo/blink_service_registry_impl.h" |
| 35 #include "content/renderer/renderer_webcookiejar_impl.h" | 34 #include "content/renderer/renderer_webcookiejar_impl.h" |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 friend class RenderFrameImplTest; | 675 friend class RenderFrameImplTest; |
| 677 friend class RenderFrameObserver; | 676 friend class RenderFrameObserver; |
| 678 friend class RendererAccessibilityTest; | 677 friend class RendererAccessibilityTest; |
| 679 friend class TestRenderFrame; | 678 friend class TestRenderFrame; |
| 680 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem); | 679 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem); |
| 681 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); | 680 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); |
| 682 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); | 681 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); |
| 683 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); | 682 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); |
| 684 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest, | 683 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest, |
| 685 AccessibilityMessagesQueueWhileSwappedOut); | 684 AccessibilityMessagesQueueWhileSwappedOut); |
| 686 FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest, ZoomLimit); | |
| 687 | 685 |
| 688 // A wrapper class used as the callback for JavaScript executed | 686 // A wrapper class used as the callback for JavaScript executed |
| 689 // in an isolated world. | 687 // in an isolated world. |
| 690 class JavaScriptIsolatedWorldRequest | 688 class JavaScriptIsolatedWorldRequest |
| 691 : public blink::WebScriptExecutionCallback { | 689 : public blink::WebScriptExecutionCallback { |
| 692 public: | 690 public: |
| 693 JavaScriptIsolatedWorldRequest( | 691 JavaScriptIsolatedWorldRequest( |
| 694 int id, | 692 int id, |
| 695 bool notify_result, | 693 bool notify_result, |
| 696 int routing_id, | 694 int routing_id, |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 // Sends a reply to the current find operation handling if it was a | 995 // Sends a reply to the current find operation handling if it was a |
| 998 // synchronous find request. | 996 // synchronous find request. |
| 999 void SendFindReply(int request_id, | 997 void SendFindReply(int request_id, |
| 1000 int match_count, | 998 int match_count, |
| 1001 int ordinal, | 999 int ordinal, |
| 1002 const blink::WebRect& selection_rect, | 1000 const blink::WebRect& selection_rect, |
| 1003 bool final_status_update); | 1001 bool final_status_update); |
| 1004 | 1002 |
| 1005 void InitializeBlameContext(RenderFrameImpl* parent_frame); | 1003 void InitializeBlameContext(RenderFrameImpl* parent_frame); |
| 1006 | 1004 |
| 1007 void OnGotZoomLevel(const GURL& url, double zoom_level); | |
| 1008 | |
| 1009 // Stores the WebLocalFrame we are associated with. This is null from the | 1005 // Stores the WebLocalFrame we are associated with. This is null from the |
| 1010 // constructor until BindToWebFrame is called, and it is null after | 1006 // constructor until BindToWebFrame is called, and it is null after |
| 1011 // frameDetached is called until destruction (which is asynchronous in the | 1007 // frameDetached is called until destruction (which is asynchronous in the |
| 1012 // case of the main frame, but not subframes). | 1008 // case of the main frame, but not subframes). |
| 1013 blink::WebLocalFrame* frame_; | 1009 blink::WebLocalFrame* frame_; |
| 1014 | 1010 |
| 1015 // Boolean value indicating whether this RenderFrameImpl object is for the | 1011 // Boolean value indicating whether this RenderFrameImpl object is for the |
| 1016 // main frame or not. It remains accurate during destruction, even when | 1012 // main frame or not. It remains accurate during destruction, even when |
| 1017 // |frame_| has been invalidated. | 1013 // |frame_| has been invalidated. |
| 1018 bool is_main_frame_; | 1014 bool is_main_frame_; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 // Only valid if |accessibility_mode_| is anything other than | 1188 // Only valid if |accessibility_mode_| is anything other than |
| 1193 // AccessibilityModeOff. | 1189 // AccessibilityModeOff. |
| 1194 RendererAccessibility* renderer_accessibility_; | 1190 RendererAccessibility* renderer_accessibility_; |
| 1195 | 1191 |
| 1196 std::unique_ptr<PermissionDispatcher> permission_client_; | 1192 std::unique_ptr<PermissionDispatcher> permission_client_; |
| 1197 | 1193 |
| 1198 std::unique_ptr<blink::WebAppBannerClient> app_banner_client_; | 1194 std::unique_ptr<blink::WebAppBannerClient> app_banner_client_; |
| 1199 | 1195 |
| 1200 std::unique_ptr<blink::WebBluetooth> bluetooth_; | 1196 std::unique_ptr<blink::WebBluetooth> bluetooth_; |
| 1201 | 1197 |
| 1202 HostZoomLevels host_zoom_levels_; | |
| 1203 mojom::FrameHostPtr frame_host_; | |
| 1204 | |
| 1205 // Manages play, pause notifications for WebMediaPlayer implementations; its | 1198 // Manages play, pause notifications for WebMediaPlayer implementations; its |
| 1206 // lifetime is tied to the RenderFrame via the RenderFrameObserver interface. | 1199 // lifetime is tied to the RenderFrame via the RenderFrameObserver interface. |
| 1207 media::RendererWebMediaPlayerDelegate* media_player_delegate_; | 1200 media::RendererWebMediaPlayerDelegate* media_player_delegate_; |
| 1208 | 1201 |
| 1209 // Whether or not this RenderFrame is using Lo-Fi mode. | 1202 // Whether or not this RenderFrame is using Lo-Fi mode. |
| 1210 bool is_using_lofi_; | 1203 bool is_using_lofi_; |
| 1211 | 1204 |
| 1212 // Effective connection type when the document of this frame was fetched. | 1205 // Effective connection type when the document of this frame was fetched. |
| 1213 blink::WebEffectiveConnectionType effective_connection_type_; | 1206 blink::WebEffectiveConnectionType effective_connection_type_; |
| 1214 | 1207 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1243 #endif | 1236 #endif |
| 1244 | 1237 |
| 1245 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1238 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 1246 | 1239 |
| 1247 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1240 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 1248 }; | 1241 }; |
| 1249 | 1242 |
| 1250 } // namespace content | 1243 } // namespace content |
| 1251 | 1244 |
| 1252 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1245 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |