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

Side by Side Diff: content/browser/frame_host/render_frame_host_delegate.h

Issue 1046933005: Refactor postMessage for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Charlie's nits Created 5 years, 8 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
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/i18n/rtl.h" 11 #include "base/i18n/rtl.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/common/frame_message_enums.h" 13 #include "content/common/frame_message_enums.h"
14 #include "content/public/browser/site_instance.h"
14 #include "content/public/common/javascript_message_type.h" 15 #include "content/public/common/javascript_message_type.h"
15 #include "content/public/common/media_stream_request.h" 16 #include "content/public/common/media_stream_request.h"
16 #include "net/http/http_response_headers.h" 17 #include "net/http/http_response_headers.h"
17 18
18 #if defined(OS_WIN) 19 #if defined(OS_WIN)
19 #include "ui/gfx/native_widget_types.h" 20 #include "ui/gfx/native_widget_types.h"
20 #endif 21 #endif
21 22
22 class GURL; 23 class GURL;
23 24
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Gets the GeolocationServiceContext associated with this delegate. 162 // Gets the GeolocationServiceContext associated with this delegate.
162 virtual GeolocationServiceContext* GetGeolocationServiceContext(); 163 virtual GeolocationServiceContext* GetGeolocationServiceContext();
163 164
164 // Notification that the frame wants to go into fullscreen mode. 165 // Notification that the frame wants to go into fullscreen mode.
165 // |origin| represents the origin of the frame that requests fullscreen. 166 // |origin| represents the origin of the frame that requests fullscreen.
166 virtual void EnterFullscreenMode(const GURL& origin) {} 167 virtual void EnterFullscreenMode(const GURL& origin) {}
167 168
168 // Notification that the frame wants to go out of fullscreen mode. 169 // Notification that the frame wants to go out of fullscreen mode.
169 virtual void ExitFullscreenMode() {} 170 virtual void ExitFullscreenMode() {}
170 171
172 // Let the delegate decide whether postMessage should be delivered to
173 // |target_rfh| from a source frame in the given SiteInstance. This defaults
174 // to false and overrides the RenderFrameHost's decision if true.
175 virtual bool ShouldRouteMessageEvent(
176 RenderFrameHost* target_rfh,
177 SiteInstance* source_site_instance) const;
178
179 // Ensure that |source_rfh| has swapped-out RenderViews and proxies for
180 // itself and for each frame on its opener chain in the current frame's
181 // SiteInstance. Returns the routing ID of the swapped-out RenderView
182 // corresponding to |source_rfh|.
183 //
184 // TODO(alexmos): This method will be removed once opener tracking and
185 // CreateOpenerRenderViews moves out of WebContents and into lower layers, as
186 // part of https://crbug.com/225940. Currently, this method temporarily
187 // supports cross-process postMessage in non-site-per-process mode, where we
188 // need to create any missing proxies for the message's source frame and its
189 // opener chain on demand.
190 virtual int EnsureOpenerRenderViewsExist(RenderFrameHost* source_rfh);
191
171 #if defined(OS_WIN) 192 #if defined(OS_WIN)
172 // Returns the frame's parent's NativeViewAccessible. 193 // Returns the frame's parent's NativeViewAccessible.
173 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); 194 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible();
174 #endif 195 #endif
175 196
176 protected: 197 protected:
177 virtual ~RenderFrameHostDelegate() {} 198 virtual ~RenderFrameHostDelegate() {}
178 }; 199 };
179 200
180 } // namespace content 201 } // namespace content
181 202
182 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ 203 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698