Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 1964273002: Add FrameHost mojo service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android-2 Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_message_enums.h" 25 #include "content/common/frame_message_enums.h"
26 #include "content/common/host_zoom_level.mojom.h"
26 #include "content/common/mojo/service_registry_impl.h" 27 #include "content/common/mojo/service_registry_impl.h"
27 #include "content/public/common/console_message_level.h" 28 #include "content/public/common/console_message_level.h"
28 #include "content/public/common/javascript_message_type.h" 29 #include "content/public/common/javascript_message_type.h"
29 #include "content/public/common/referrer.h" 30 #include "content/public/common/referrer.h"
30 #include "content/public/common/stop_find_action.h" 31 #include "content/public/common/stop_find_action.h"
31 #include "content/public/renderer/render_frame.h" 32 #include "content/public/renderer/render_frame.h"
32 #include "content/renderer/frame_blame_context.h" 33 #include "content/renderer/frame_blame_context.h"
33 #include "content/renderer/mojo/blink_service_registry_impl.h" 34 #include "content/renderer/mojo/blink_service_registry_impl.h"
34 #include "content/renderer/render_frame_proxy.h" 35 #include "content/renderer/render_frame_proxy.h"
35 #include "content/renderer/renderer_webcookiejar_impl.h" 36 #include "content/renderer/renderer_webcookiejar_impl.h"
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 friend class RenderFrameImplTest; 653 friend class RenderFrameImplTest;
653 friend class RenderFrameObserver; 654 friend class RenderFrameObserver;
654 friend class RendererAccessibilityTest; 655 friend class RendererAccessibilityTest;
655 friend class TestRenderFrame; 656 friend class TestRenderFrame;
656 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem); 657 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem);
657 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); 658 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange);
658 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); 659 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase);
659 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); 660 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate);
660 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest, 661 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest,
661 AccessibilityMessagesQueueWhileSwappedOut); 662 AccessibilityMessagesQueueWhileSwappedOut);
663 FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest, ZoomLimit);
662 664
663 // A wrapper class used as the callback for JavaScript executed 665 // A wrapper class used as the callback for JavaScript executed
664 // in an isolated world. 666 // in an isolated world.
665 class JavaScriptIsolatedWorldRequest 667 class JavaScriptIsolatedWorldRequest
666 : public blink::WebScriptExecutionCallback { 668 : public blink::WebScriptExecutionCallback {
667 public: 669 public:
668 JavaScriptIsolatedWorldRequest( 670 JavaScriptIsolatedWorldRequest(
669 int id, 671 int id,
670 bool notify_result, 672 bool notify_result,
671 int routing_id, 673 int routing_id,
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 // Sends a reply to the current find operation handling if it was a 976 // Sends a reply to the current find operation handling if it was a
975 // synchronous find request. 977 // synchronous find request.
976 void SendFindReply(int request_id, 978 void SendFindReply(int request_id,
977 int match_count, 979 int match_count,
978 int ordinal, 980 int ordinal,
979 const blink::WebRect& selection_rect, 981 const blink::WebRect& selection_rect,
980 bool final_status_update); 982 bool final_status_update);
981 983
982 void InitializeBlameContext(RenderFrameImpl* parent_frame); 984 void InitializeBlameContext(RenderFrameImpl* parent_frame);
983 985
986 void OnGotZoomLevel(const GURL& url, double zoom_level);
987
984 // Stores the WebLocalFrame we are associated with. This is null from the 988 // Stores the WebLocalFrame we are associated with. This is null from the
985 // constructor until BindToWebFrame is called, and it is null after 989 // constructor until BindToWebFrame is called, and it is null after
986 // frameDetached is called until destruction (which is asynchronous in the 990 // frameDetached is called until destruction (which is asynchronous in the
987 // case of the main frame, but not subframes). 991 // case of the main frame, but not subframes).
988 blink::WebLocalFrame* frame_; 992 blink::WebLocalFrame* frame_;
989 993
990 // Boolean value indicating whether this RenderFrameImpl object is for the 994 // Boolean value indicating whether this RenderFrameImpl object is for the
991 // main frame or not. It remains accurate during destruction, even when 995 // main frame or not. It remains accurate during destruction, even when
992 // |frame_| has been invalidated. 996 // |frame_| has been invalidated.
993 bool is_main_frame_; 997 bool is_main_frame_;
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 // Only valid if |accessibility_mode_| is anything other than 1177 // Only valid if |accessibility_mode_| is anything other than
1174 // AccessibilityModeOff. 1178 // AccessibilityModeOff.
1175 RendererAccessibility* renderer_accessibility_; 1179 RendererAccessibility* renderer_accessibility_;
1176 1180
1177 std::unique_ptr<PermissionDispatcher> permission_client_; 1181 std::unique_ptr<PermissionDispatcher> permission_client_;
1178 1182
1179 std::unique_ptr<blink::WebAppBannerClient> app_banner_client_; 1183 std::unique_ptr<blink::WebAppBannerClient> app_banner_client_;
1180 1184
1181 std::unique_ptr<blink::WebBluetooth> bluetooth_; 1185 std::unique_ptr<blink::WebBluetooth> bluetooth_;
1182 1186
1187 HostZoomLevels host_zoom_levels_;
1188 mojom::HostZoomLevelPtr host_zoom_level_;
wjmaclean 2016/05/16 18:53:07 nit: these names are *very* similar and might be c
scottmg 2016/05/16 22:54:56 How about host_zoom_levels_ and mojo_host_zoom_lev
1189
1183 // Manages play, pause notifications for WebMediaPlayer implementations; its 1190 // Manages play, pause notifications for WebMediaPlayer implementations; its
1184 // lifetime is tied to the RenderFrame via the RenderFrameObserver interface. 1191 // lifetime is tied to the RenderFrame via the RenderFrameObserver interface.
1185 media::RendererWebMediaPlayerDelegate* media_player_delegate_; 1192 media::RendererWebMediaPlayerDelegate* media_player_delegate_;
1186 1193
1187 // Whether or not this RenderFrame is using Lo-Fi mode. 1194 // Whether or not this RenderFrame is using Lo-Fi mode.
1188 bool is_using_lofi_; 1195 bool is_using_lofi_;
1189 1196
1190 // Effective connection type when the document of this frame was fetched. 1197 // Effective connection type when the document of this frame was fetched.
1191 blink::WebEffectiveConnectionType effective_connection_type_; 1198 blink::WebEffectiveConnectionType effective_connection_type_;
1192 1199
(...skipping 13 matching lines...) Expand all
1206 FrameBlameContext* blame_context_; // Not owned. 1213 FrameBlameContext* blame_context_; // Not owned.
1207 1214
1208 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1215 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1209 1216
1210 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1217 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1211 }; 1218 };
1212 1219
1213 } // namespace content 1220 } // namespace content
1214 1221
1215 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1222 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698