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

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

Issue 2627393002: Replace std::map with std::pair for (origin, engagement) tuples in RenderFrameImpl. (Closed)
Patch Set: Created 3 years, 11 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
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 758
759 int id_; 759 int id_;
760 bool notify_result_; 760 bool notify_result_;
761 int routing_id_; 761 int routing_id_;
762 base::WeakPtr<RenderFrameImpl> render_frame_impl_; 762 base::WeakPtr<RenderFrameImpl> render_frame_impl_;
763 763
764 DISALLOW_COPY_AND_ASSIGN(JavaScriptIsolatedWorldRequest); 764 DISALLOW_COPY_AND_ASSIGN(JavaScriptIsolatedWorldRequest);
765 }; 765 };
766 766
767 typedef std::map<GURL, double> HostZoomLevels; 767 typedef std::map<GURL, double> HostZoomLevels;
768 typedef std::map<url::Origin, blink::mojom::EngagementLevel> EngagementLevels; 768 typedef std::pair<url::Origin, blink::mojom::EngagementLevel>
769 EngagementOriginAndLevel;
769 770
770 // Creates a new RenderFrame. |render_view| is the RenderView object that this 771 // Creates a new RenderFrame. |render_view| is the RenderView object that this
771 // frame belongs to. 772 // frame belongs to.
772 // Callers *must* call |BindToWebFrame| immediately after creation. 773 // Callers *must* call |BindToWebFrame| immediately after creation.
773 static RenderFrameImpl* Create(RenderViewImpl* render_view, 774 static RenderFrameImpl* Create(RenderViewImpl* render_view,
774 int32_t routing_id); 775 int32_t routing_id);
775 776
776 // This is called right after creation with the WebLocalFrame for this 777 // This is called right after creation with the WebLocalFrame for this
777 // RenderFrame. It must be called before Initialize. 778 // RenderFrame. It must be called before Initialize.
778 void BindToWebFrame(blink::WebLocalFrame* web_frame); 779 void BindToWebFrame(blink::WebLocalFrame* web_frame);
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 PepperPluginInstanceImpl* focused_pepper_plugin_; 1337 PepperPluginInstanceImpl* focused_pepper_plugin_;
1337 1338
1338 // The plugin instance that received the last mouse event. It is set to NULL 1339 // The plugin instance that received the last mouse event. It is set to NULL
1339 // if the last mouse event went to elements other than Pepper plugins. 1340 // if the last mouse event went to elements other than Pepper plugins.
1340 // |pepper_last_mouse_event_target_| is not owned by this class. We depend on 1341 // |pepper_last_mouse_event_target_| is not owned by this class. We depend on
1341 // the RenderFrameImpl to NULL it out when it destructs. 1342 // the RenderFrameImpl to NULL it out when it destructs.
1342 PepperPluginInstanceImpl* pepper_last_mouse_event_target_; 1343 PepperPluginInstanceImpl* pepper_last_mouse_event_target_;
1343 #endif 1344 #endif
1344 1345
1345 HostZoomLevels host_zoom_levels_; 1346 HostZoomLevels host_zoom_levels_;
1346 EngagementLevels engagement_levels_; 1347 EngagementOriginAndLevel engagement_level_;
1347 1348
1348 mojo::AssociatedBinding<blink::mojom::EngagementClient> engagement_binding_; 1349 mojo::AssociatedBinding<blink::mojom::EngagementClient> engagement_binding_;
1349 mojo::Binding<mojom::Frame> frame_binding_; 1350 mojo::Binding<mojom::Frame> frame_binding_;
1350 mojo::AssociatedBinding<mojom::HostZoom> host_zoom_binding_; 1351 mojo::AssociatedBinding<mojom::HostZoom> host_zoom_binding_;
1351 mojom::FrameHostPtr frame_host_; 1352 mojom::FrameHostPtr frame_host_;
1352 1353
1353 // Indicates whether |didAccessInitialDocument| was called. 1354 // Indicates whether |didAccessInitialDocument| was called.
1354 bool has_accessed_initial_document_; 1355 bool has_accessed_initial_document_;
1355 1356
1356 AssociatedInterfaceRegistryImpl associated_interfaces_; 1357 AssociatedInterfaceRegistryImpl associated_interfaces_;
1357 std::unique_ptr<AssociatedInterfaceProviderImpl> 1358 std::unique_ptr<AssociatedInterfaceProviderImpl>
1358 remote_associated_interfaces_; 1359 remote_associated_interfaces_;
1359 1360
1360 // TODO(dcheng): Remove these members. 1361 // TODO(dcheng): Remove these members.
1361 bool committed_first_load_ = false; 1362 bool committed_first_load_ = false;
1362 bool name_changed_before_first_commit_ = false; 1363 bool name_changed_before_first_commit_ = false;
1363 1364
1364 bool browser_side_navigation_pending_ = false; 1365 bool browser_side_navigation_pending_ = false;
1365 1366
1366 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1367 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1367 1368
1368 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1369 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1369 }; 1370 };
1370 1371
1371 } // namespace content 1372 } // namespace content
1372 1373
1373 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1374 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698