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

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

Issue 692973005: Pass origin information for remote frame creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review feedback; send origins with DidCommitProvisionalLoad Created 6 years, 1 month 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 <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 10 matching lines...) Expand all
21 #include "content/public/common/referrer.h" 21 #include "content/public/common/referrer.h"
22 #include "content/public/renderer/render_frame.h" 22 #include "content/public/renderer/render_frame.h"
23 #include "content/renderer/render_frame_proxy.h" 23 #include "content/renderer/render_frame_proxy.h"
24 #include "content/renderer/renderer_webcookiejar_impl.h" 24 #include "content/renderer/renderer_webcookiejar_impl.h"
25 #include "ipc/ipc_message.h" 25 #include "ipc/ipc_message.h"
26 #include "media/blink/webmediaplayer_delegate.h" 26 #include "media/blink/webmediaplayer_delegate.h"
27 #include "third_party/WebKit/public/web/WebAXObject.h" 27 #include "third_party/WebKit/public/web/WebAXObject.h"
28 #include "third_party/WebKit/public/web/WebDataSource.h" 28 #include "third_party/WebKit/public/web/WebDataSource.h"
29 #include "third_party/WebKit/public/web/WebFrameClient.h" 29 #include "third_party/WebKit/public/web/WebFrameClient.h"
30 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" 30 #include "third_party/WebKit/public/web/WebHistoryCommitType.h"
31 #include "third_party/WebKit/public/web/WebRemoteFrame.h"
31 #include "ui/gfx/range/range.h" 32 #include "ui/gfx/range/range.h"
32 33
33 #if defined(OS_ANDROID) 34 #if defined(OS_ANDROID)
34 #include "content/renderer/media/android/renderer_media_player_manager.h" 35 #include "content/renderer/media/android/renderer_media_player_manager.h"
35 #endif 36 #endif
36 37
37 class GURL; 38 class GURL;
38 class TransportDIB; 39 class TransportDIB;
39 struct FrameHostMsg_AddNavigationTransitionData_Params; 40 struct FrameHostMsg_AddNavigationTransitionData_Params;
40 struct FrameMsg_Navigate_Params; 41 struct FrameMsg_Navigate_Params;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 class RendererPpapiHost; 82 class RendererPpapiHost;
82 class RenderFrameObserver; 83 class RenderFrameObserver;
83 class RenderViewImpl; 84 class RenderViewImpl;
84 class RenderWidget; 85 class RenderWidget;
85 class RenderWidgetFullscreenPepper; 86 class RenderWidgetFullscreenPepper;
86 class ScreenOrientationDispatcher; 87 class ScreenOrientationDispatcher;
87 class UserMediaClientImpl; 88 class UserMediaClientImpl;
88 struct CommitNavigationParams; 89 struct CommitNavigationParams;
89 struct CommonNavigationParams; 90 struct CommonNavigationParams;
90 struct CustomContextMenuContext; 91 struct CustomContextMenuContext;
92 struct FrameReplicationState;
91 struct RequestNavigationParams; 93 struct RequestNavigationParams;
92 struct ResourceResponseHead; 94 struct ResourceResponseHead;
93 95
94 class CONTENT_EXPORT RenderFrameImpl 96 class CONTENT_EXPORT RenderFrameImpl
95 : public RenderFrame, 97 : public RenderFrame,
96 NON_EXPORTED_BASE(public blink::WebFrameClient), 98 NON_EXPORTED_BASE(public blink::WebFrameClient),
97 NON_EXPORTED_BASE(public media::WebMediaPlayerDelegate) { 99 NON_EXPORTED_BASE(public media::WebMediaPlayerDelegate) {
98 public: 100 public:
99 // Creates a new RenderFrame. |render_view| is the RenderView object that this 101 // Creates a new RenderFrame. |render_view| is the RenderView object that this
100 // frame belongs to. 102 // frame belongs to.
(...skipping 20 matching lines...) Expand all
121 static RenderFrameImpl* FromRoutingID(int routing_id); 123 static RenderFrameImpl* FromRoutingID(int routing_id);
122 124
123 // Just like RenderFrame::FromWebFrame but returns the implementation. 125 // Just like RenderFrame::FromWebFrame but returns the implementation.
124 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); 126 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame);
125 127
126 // Used by content_layouttest_support to hook into the creation of 128 // Used by content_layouttest_support to hook into the creation of
127 // RenderFrameImpls. 129 // RenderFrameImpls.
128 static void InstallCreateHook( 130 static void InstallCreateHook(
129 RenderFrameImpl* (*create_render_frame_impl)(RenderViewImpl*, int32)); 131 RenderFrameImpl* (*create_render_frame_impl)(RenderViewImpl*, int32));
130 132
133 // Pass replicated information, such as security origin, to a WebRemoteFrame.
134 static void SetReplicatedState(blink::WebRemoteFrame* frame,
135 const FrameReplicationState& state);
136
131 virtual ~RenderFrameImpl(); 137 virtual ~RenderFrameImpl();
132 138
133 bool is_swapped_out() const { 139 bool is_swapped_out() const {
134 return is_swapped_out_; 140 return is_swapped_out_;
135 } 141 }
136 142
137 // TODO(nasko): This can be removed once we don't have a swapped out state on 143 // TODO(nasko): This can be removed once we don't have a swapped out state on
138 // RenderFrames. See https://crbug.com/357747. 144 // RenderFrames. See https://crbug.com/357747.
139 void set_render_frame_proxy(RenderFrameProxy* proxy) { 145 void set_render_frame_proxy(RenderFrameProxy* proxy) {
140 render_frame_proxy_ = proxy; 146 render_frame_proxy_ = proxy;
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem); 512 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem);
507 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); 513 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange);
508 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); 514 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase);
509 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); 515 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate);
510 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest, 516 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest,
511 AccessibilityMessagesQueueWhileSwappedOut); 517 AccessibilityMessagesQueueWhileSwappedOut);
512 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 518 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
513 OnExtendSelectionAndDelete); 519 OnExtendSelectionAndDelete);
514 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ReloadWhileSwappedOut); 520 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ReloadWhileSwappedOut);
515 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SendSwapOutACK); 521 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SendSwapOutACK);
522 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OriginReplicationForSwapOut);
516 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 523 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
517 SetEditableSelectionAndComposition); 524 SetEditableSelectionAndComposition);
518 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 525 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
519 OnSetAccessibilityMode); 526 OnSetAccessibilityMode);
520 527
521 typedef std::map<GURL, double> HostZoomLevels; 528 typedef std::map<GURL, double> HostZoomLevels;
522 529
523 // Functions to add and remove observers for this object. 530 // Functions to add and remove observers for this object.
524 void AddObserver(RenderFrameObserver* observer); 531 void AddObserver(RenderFrameObserver* observer);
525 void RemoveObserver(RenderFrameObserver* observer); 532 void RemoveObserver(RenderFrameObserver* observer);
526 533
527 // Builds and sends DidCommitProvisionalLoad to the host. 534 // Builds and sends DidCommitProvisionalLoad to the host.
528 void SendDidCommitProvisionalLoad(blink::WebFrame* frame); 535 void SendDidCommitProvisionalLoad(blink::WebFrame* frame);
529 536
530 // Gets the focused element. If no such element exists then the element will 537 // Gets the focused element. If no such element exists then the element will
531 // be NULL. 538 // be NULL.
532 blink::WebElement GetFocusedElement(); 539 blink::WebElement GetFocusedElement();
533 540
534 // IPC message handlers ------------------------------------------------------ 541 // IPC message handlers ------------------------------------------------------
535 // 542 //
536 // The documentation for these functions should be in 543 // The documentation for these functions should be in
537 // content/common/*_messages.h for the message that the function is handling. 544 // content/common/*_messages.h for the message that the function is handling.
538 void OnBeforeUnload(); 545 void OnBeforeUnload();
539 void OnSwapOut(int proxy_routing_id); 546 void OnSwapOut(int proxy_routing_id,
547 const FrameReplicationState& remote_frame_state);
540 void OnStop(); 548 void OnStop();
541 void OnShowContextMenu(const gfx::Point& location); 549 void OnShowContextMenu(const gfx::Point& location);
542 void OnContextMenuClosed(const CustomContextMenuContext& custom_context); 550 void OnContextMenuClosed(const CustomContextMenuContext& custom_context);
543 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context, 551 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context,
544 unsigned action); 552 unsigned action);
545 void OnUndo(); 553 void OnUndo();
546 void OnRedo(); 554 void OnRedo();
547 void OnCut(); 555 void OnCut();
548 void OnCopy(); 556 void OnCopy();
549 void OnPaste(); 557 void OnPaste();
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 #endif 820 #endif
813 821
814 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 822 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
815 823
816 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 824 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
817 }; 825 };
818 826
819 } // namespace content 827 } // namespace content
820 828
821 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 829 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698