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

Side by Side Diff: content/browser/renderer_host/render_view_host.h

Issue 6319001: Support window.opener after a process swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comments. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_RENDERER_HOST_RENDER_VIEW_HOST_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // for a cross-site navigation, because we must suspend any navigations until 155 // for a cross-site navigation, because we must suspend any navigations until
156 // we hear back from the old renderer's onbeforeunload handler. Note that it 156 // we hear back from the old renderer's onbeforeunload handler. Note that it
157 // is important that only one navigation event happen after calling this 157 // is important that only one navigation event happen after calling this
158 // method with |suspend| equal to true. If |suspend| is false and there is 158 // method with |suspend| equal to true. If |suspend| is false and there is
159 // a suspended_nav_message_, this will send the message. This function 159 // a suspended_nav_message_, this will send the message. This function
160 // should only be called to toggle the state; callers should check 160 // should only be called to toggle the state; callers should check
161 // are_navigations_suspended() first. 161 // are_navigations_suspended() first.
162 void SetNavigationsSuspended(bool suspend); 162 void SetNavigationsSuspended(bool suspend);
163 163
164 // Causes the renderer to invoke the onbeforeunload event handler. The 164 // Causes the renderer to invoke the onbeforeunload event handler. The
165 // result will be returned via ViewMsg_ShouldClose. See also ClosePage which 165 // result will be returned via ViewMsg_ShouldClose. See also ClosePage and
166 // will fire the PageUnload event. 166 // SwapOut, which fire the PageUnload event.
167 // 167 //
168 // Set bool for_cross_site_transition when this close is just for the current 168 // Set bool for_cross_site_transition when this close is just for the current
169 // RenderView in the case of a cross-site transition. False means we're 169 // RenderView in the case of a cross-site transition. False means we're
170 // closing the entire tab. 170 // closing the entire tab.
171 void FirePageBeforeUnload(bool for_cross_site_transition); 171 void FirePageBeforeUnload(bool for_cross_site_transition);
172 172
173 // Tells the renderer that this RenderView is being swapped out for one in a
174 // different renderer process. The renderer should preserve the Frame object
175 // until it exits (when it has no more active RenderViews).
176 //
177 // Please see ViewMsg_SwapOut_Params in view_messages.h for a description
178 // of the parameters.
179 void SwapOut(int new_render_process_host_id, int new_request_id);
180
181 // Called by ResourceDispatcherHost after the SwapOutACK is received.
182 void OnSwapOutACK();
183
173 // Causes the renderer to close the current page, including running its 184 // Causes the renderer to close the current page, including running its
174 // onunload event handler. A ClosePage_ACK message will be sent to the 185 // onunload event handler. A ClosePage_ACK message will be sent to the
175 // ResourceDispatcherHost when it is finished. 186 // ResourceDispatcherHost when it is finished.
176 // 187 void ClosePage();
177 // Please see ViewMsg_ClosePage in resource_messages_internal.h for a
178 // description of the parameters.
179 void ClosePage(bool for_cross_site_transition,
180 int new_render_process_host_id,
181 int new_request_id);
182
183 // Called by ResourceDispatcherHost after the ClosePageACK is received.
184 void OnClosePageACK(bool for_cross_site_transition);
185 188
186 // Close the page ignoring whether it has unload events registers. 189 // Close the page ignoring whether it has unload events registers.
187 // This is called after the beforeunload and unload events have fired 190 // This is called after the beforeunload and unload events have fired
188 // and the user has agreed to continue with closing the page. 191 // and the user has agreed to continue with closing the page.
189 void ClosePageIgnoringUnloadEvents(); 192 void ClosePageIgnoringUnloadEvents();
190 193
191 // Sets whether this RenderViewHost has an outstanding cross-site request, 194 // Sets whether this RenderViewHost has an outstanding cross-site request,
192 // for which another renderer will need to run an onunload event handler. 195 // for which another renderer will need to run an onunload event handler.
193 // This is called before the first navigation event for this RenderViewHost, 196 // This is called before the first navigation event for this RenderViewHost,
194 // and again after the corresponding OnCrossSiteResponse. 197 // and again after the corresponding OnCrossSiteResponse.
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 const SkBitmap& image, 580 const SkBitmap& image,
578 const gfx::Point& image_offset); 581 const gfx::Point& image_offset);
579 void OnUpdateDragCursor(WebKit::WebDragOperation drag_operation); 582 void OnUpdateDragCursor(WebKit::WebDragOperation drag_operation);
580 void OnTakeFocus(bool reverse); 583 void OnTakeFocus(bool reverse);
581 void OnAddMessageToConsole(const std::wstring& message, 584 void OnAddMessageToConsole(const std::wstring& message,
582 int32 line_no, 585 int32 line_no,
583 const std::wstring& source_id); 586 const std::wstring& source_id);
584 void OnUpdateInspectorSetting(const std::string& key, 587 void OnUpdateInspectorSetting(const std::string& key,
585 const std::string& value); 588 const std::string& value);
586 void OnMsgShouldCloseACK(bool proceed); 589 void OnMsgShouldCloseACK(bool proceed);
590 void OnMsgClosePageACK();
587 591
588 void OnAccessibilityNotifications( 592 void OnAccessibilityNotifications(
589 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params); 593 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params);
590 void OnCSSInserted(); 594 void OnCSSInserted();
591 void OnContentBlocked(ContentSettingsType type, 595 void OnContentBlocked(ContentSettingsType type,
592 const std::string& resource_identifier); 596 const std::string& resource_identifier);
593 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); 597 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy);
594 void OnWebDatabaseAccessed(const GURL& url, 598 void OnWebDatabaseAccessed(const GURL& url,
595 const string16& name, 599 const string16& name,
596 const string16& display_name, 600 const string16& display_name,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 // The enabled/disabled states of various commands. 695 // The enabled/disabled states of various commands.
692 std::map<RenderViewCommand, CommandState> command_states_; 696 std::map<RenderViewCommand, CommandState> command_states_;
693 697
694 // A list of observers that filter messages. Weak references. 698 // A list of observers that filter messages. Weak references.
695 ObserverList<RenderViewHostObserver> observers_; 699 ObserverList<RenderViewHostObserver> observers_;
696 700
697 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); 701 DISALLOW_COPY_AND_ASSIGN(RenderViewHost);
698 }; 702 };
699 703
700 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ 704 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698