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

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

Issue 2374863002: Remove usage of HostZoomMap from c/b/loader via ReadyToCommitNavigation (Closed)
Patch Set: android Created 4 years, 2 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/ref_counted.h" 20 #include "base/memory/ref_counted.h"
21 #include "base/memory/weak_ptr.h" 21 #include "base/memory/weak_ptr.h"
22 #include "base/observer_list.h" 22 #include "base/observer_list.h"
23 #include "base/process/process_handle.h" 23 #include "base/process/process_handle.h"
24 #include "build/build_config.h" 24 #include "build/build_config.h"
25 #include "content/common/accessibility_mode_enums.h" 25 #include "content/common/accessibility_mode_enums.h"
26 #include "content/common/associated_interface_registry_impl.h" 26 #include "content/common/associated_interface_registry_impl.h"
27 #include "content/common/frame.mojom.h" 27 #include "content/common/frame.mojom.h"
28 #include "content/common/frame_message_enums.h" 28 #include "content/common/frame_message_enums.h"
29 #include "content/common/host_zoom.mojom.h"
29 #include "content/public/common/console_message_level.h" 30 #include "content/public/common/console_message_level.h"
30 #include "content/public/common/javascript_message_type.h" 31 #include "content/public/common/javascript_message_type.h"
31 #include "content/public/common/referrer.h" 32 #include "content/public/common/referrer.h"
32 #include "content/public/common/stop_find_action.h" 33 #include "content/public/common/stop_find_action.h"
33 #include "content/public/renderer/render_frame.h" 34 #include "content/public/renderer/render_frame.h"
34 #include "content/renderer/frame_blame_context.h" 35 #include "content/renderer/frame_blame_context.h"
35 #include "content/renderer/mojo/blink_interface_provider_impl.h" 36 #include "content/renderer/mojo/blink_interface_provider_impl.h"
36 #include "content/renderer/renderer_webcookiejar_impl.h" 37 #include "content/renderer/renderer_webcookiejar_impl.h"
37 #include "ipc/ipc_message.h" 38 #include "ipc/ipc_message.h"
38 #include "ipc/ipc_platform_file.h" 39 #include "ipc/ipc_platform_file.h"
39 #include "media/blink/webmediaplayer_delegate.h" 40 #include "media/blink/webmediaplayer_delegate.h"
40 #include "media/blink/webmediaplayer_params.h" 41 #include "media/blink/webmediaplayer_params.h"
41 #include "media/mojo/interfaces/remoting.mojom.h" 42 #include "media/mojo/interfaces/remoting.mojom.h"
43 #include "mojo/public/cpp/bindings/associated_binding.h"
42 #include "mojo/public/cpp/bindings/binding.h" 44 #include "mojo/public/cpp/bindings/binding.h"
43 #include "services/shell/public/interfaces/connector.mojom.h" 45 #include "services/shell/public/interfaces/connector.mojom.h"
44 #include "services/shell/public/interfaces/interface_provider.mojom.h" 46 #include "services/shell/public/interfaces/interface_provider.mojom.h"
45 #include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h" 47 #include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h"
46 #include "third_party/WebKit/public/platform/WebFocusType.h" 48 #include "third_party/WebKit/public/platform/WebFocusType.h"
47 #include "third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h" 49 #include "third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h"
48 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" 50 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
49 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" 51 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
50 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie nt.h" 52 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie nt.h"
51 #include "third_party/WebKit/public/web/WebAXObject.h" 53 #include "third_party/WebKit/public/web/WebAXObject.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 struct NavigationParams; 165 struct NavigationParams;
164 struct RequestNavigationParams; 166 struct RequestNavigationParams;
165 struct ResourceResponseHead; 167 struct ResourceResponseHead;
166 struct ScreenInfo; 168 struct ScreenInfo;
167 struct StartNavigationParams; 169 struct StartNavigationParams;
168 struct StreamOverrideParameters; 170 struct StreamOverrideParameters;
169 171
170 class CONTENT_EXPORT RenderFrameImpl 172 class CONTENT_EXPORT RenderFrameImpl
171 : public RenderFrame, 173 : public RenderFrame,
172 NON_EXPORTED_BASE(mojom::Frame), 174 NON_EXPORTED_BASE(mojom::Frame),
175 NON_EXPORTED_BASE(mojom::HostZoom),
173 NON_EXPORTED_BASE(public blink::WebFrameClient), 176 NON_EXPORTED_BASE(public blink::WebFrameClient),
174 NON_EXPORTED_BASE(public blink::WebFrameSerializerClient) { 177 NON_EXPORTED_BASE(public blink::WebFrameSerializerClient) {
175 public: 178 public:
176 // Creates a new RenderFrame as the main frame of |render_view|. 179 // Creates a new RenderFrame as the main frame of |render_view|.
177 static RenderFrameImpl* CreateMainFrame( 180 static RenderFrameImpl* CreateMainFrame(
178 RenderViewImpl* render_view, 181 RenderViewImpl* render_view,
179 int32_t routing_id, 182 int32_t routing_id,
180 int32_t widget_routing_id, 183 int32_t widget_routing_id,
181 bool hidden, 184 bool hidden,
182 const ScreenInfo& screen_info, 185 const ScreenInfo& screen_info,
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 void AddMessageToConsole(ConsoleMessageLevel level, 445 void AddMessageToConsole(ConsoleMessageLevel level,
443 const std::string& message) override; 446 const std::string& message) override;
444 bool IsUsingLoFi() const override; 447 bool IsUsingLoFi() const override;
445 bool IsPasting() const override; 448 bool IsPasting() const override;
446 blink::WebPageVisibilityState GetVisibilityState() const override; 449 blink::WebPageVisibilityState GetVisibilityState() const override;
447 450
448 // mojom::Frame implementation: 451 // mojom::Frame implementation:
449 void GetInterfaceProvider( 452 void GetInterfaceProvider(
450 shell::mojom::InterfaceProviderRequest request) override; 453 shell::mojom::InterfaceProviderRequest request) override;
451 454
455 // mojom::HostZoom implementation
456 void SetHostZoomLevel(const GURL& url, double zoom_level) override;
457
nasko 2016/10/17 22:49:03 nit: Do we need the empty line here?
scottmg 2016/10/25 20:12:40 It's not part of mojom::HostZoom. Moved it up near
458 void OnHostZoomClientRequest(mojom::HostZoomAssociatedRequest request);
459
452 // blink::WebFrameClient implementation: 460 // blink::WebFrameClient implementation:
453 blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame, 461 blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame,
454 const blink::WebPluginParams& params) override; 462 const blink::WebPluginParams& params) override;
455 blink::WebMediaPlayer* createMediaPlayer( 463 blink::WebMediaPlayer* createMediaPlayer(
456 const blink::WebMediaPlayerSource& source, 464 const blink::WebMediaPlayerSource& source,
457 blink::WebMediaPlayerClient* client, 465 blink::WebMediaPlayerClient* client,
458 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, 466 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
459 blink::WebContentDecryptionModule* initial_cdm, 467 blink::WebContentDecryptionModule* initial_cdm,
460 const blink::WebString& sink_id) override; 468 const blink::WebString& sink_id) override;
461 blink::WebMediaSession* createMediaSession() override; 469 blink::WebMediaSession* createMediaSession() override;
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 friend class RenderFrameImplTest; 714 friend class RenderFrameImplTest;
707 friend class RenderFrameObserver; 715 friend class RenderFrameObserver;
708 friend class RenderAccessibilityImplTest; 716 friend class RenderAccessibilityImplTest;
709 friend class TestRenderFrame; 717 friend class TestRenderFrame;
710 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem); 718 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem);
711 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); 719 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange);
712 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); 720 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase);
713 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); 721 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate);
714 FRIEND_TEST_ALL_PREFIXES(RenderAccessibilityImplTest, 722 FRIEND_TEST_ALL_PREFIXES(RenderAccessibilityImplTest,
715 AccessibilityMessagesQueueWhileSwappedOut); 723 AccessibilityMessagesQueueWhileSwappedOut);
724 FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest, ZoomLimit);
716 725
717 // A wrapper class used as the callback for JavaScript executed 726 // A wrapper class used as the callback for JavaScript executed
718 // in an isolated world. 727 // in an isolated world.
719 class JavaScriptIsolatedWorldRequest 728 class JavaScriptIsolatedWorldRequest
720 : public blink::WebScriptExecutionCallback { 729 : public blink::WebScriptExecutionCallback {
721 public: 730 public:
722 JavaScriptIsolatedWorldRequest( 731 JavaScriptIsolatedWorldRequest(
723 int id, 732 int id,
724 bool notify_result, 733 bool notify_result,
725 int routing_id, 734 int routing_id,
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 // Whether or not the focus is on a PPAPI plugin 1292 // Whether or not the focus is on a PPAPI plugin
1284 PepperPluginInstanceImpl* focused_pepper_plugin_; 1293 PepperPluginInstanceImpl* focused_pepper_plugin_;
1285 1294
1286 // The plugin instance that received the last mouse event. It is set to NULL 1295 // The plugin instance that received the last mouse event. It is set to NULL
1287 // if the last mouse event went to elements other than Pepper plugins. 1296 // if the last mouse event went to elements other than Pepper plugins.
1288 // |pepper_last_mouse_event_target_| is not owned by this class. We depend on 1297 // |pepper_last_mouse_event_target_| is not owned by this class. We depend on
1289 // the RenderFrameImpl to NULL it out when it destructs. 1298 // the RenderFrameImpl to NULL it out when it destructs.
1290 PepperPluginInstanceImpl* pepper_last_mouse_event_target_; 1299 PepperPluginInstanceImpl* pepper_last_mouse_event_target_;
1291 #endif 1300 #endif
1292 1301
1302 HostZoomLevels host_zoom_levels_;
1303
1293 mojo::Binding<mojom::Frame> frame_binding_; 1304 mojo::Binding<mojom::Frame> frame_binding_;
1294 mojom::FrameHostPtr frame_host_; 1305 mojom::FrameHostPtr frame_host_;
1306 mojo::AssociatedBinding<mojom::HostZoom> host_zoom_binding_;
nasko 2016/10/17 22:49:03 nit: Move it above the FrameHostPtr, so all mojo::
scottmg 2016/10/25 20:12:40 Done.
1295 1307
1296 // Indicates whether |didAccessInitialDocument| was called. 1308 // Indicates whether |didAccessInitialDocument| was called.
1297 bool has_accessed_initial_document_; 1309 bool has_accessed_initial_document_;
1298 1310
1299 AssociatedInterfaceRegistryImpl associated_interfaces_; 1311 AssociatedInterfaceRegistryImpl associated_interfaces_;
1300 std::unique_ptr<AssociatedInterfaceProviderImpl> 1312 std::unique_ptr<AssociatedInterfaceProviderImpl>
1301 remote_associated_interfaces_; 1313 remote_associated_interfaces_;
1302 1314
1303 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1315 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1304 1316
1305 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1317 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1306 }; 1318 };
1307 1319
1308 } // namespace content 1320 } // namespace content
1309 1321
1310 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1322 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698