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

Unified Diff: content/renderer/render_widget.h

Issue 6319001: Support window.opener after a process swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk. Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.h
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index 63580c7358c09f901313c81a39be6fd740a16774..74944f600f0c12ee6ac5f13b8138534ee10427fe 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -154,6 +154,12 @@ class RenderWidget : public IPC::Channel::Listener,
void CompleteInit(gfx::NativeViewId parent,
gfx::PluginWindowHandle compositing_surface);
+ // Sets whether this RenderWidget has been swapped out to be displayed by
+ // a RenderWidget in a different process. If so, no new IPC messages will be
+ // sent (only ACKs) and the process is free to exit when there are no other
+ // active RenderWidgets.
+ void SetSwappedOut(bool is_swapped_out);
+
// Paints the given rectangular region of the WebWidget into canvas (a
// shared memory segment returned by AllocPaintBuf on Windows). The caller
// must ensure that the given rect fits within the bounds of the WebWidget.
@@ -183,6 +189,7 @@ class RenderWidget : public IPC::Channel::Listener,
const gfx::Rect& resizer_rect);
virtual void OnWasHidden();
virtual void OnWasRestored(bool needs_repainting);
+ virtual void OnWasSwappedOut();
void OnUpdateRectAck();
void OnCreateVideoAck(int32 video_id);
void OnUpdateVideoAck(int32 video_id);
@@ -343,6 +350,11 @@ class RenderWidget : public IPC::Channel::Listener,
// be sent, except for a Close.
bool closing_;
+ // Whether this RenderWidget is currently swapped out, such that the view is
+ // being rendered by another process. If all RenderWidgets in a process are
+ // swapped out, the process can exit.
+ bool is_swapped_out_;
+
// Indicates if an input method is active in the browser process.
bool input_method_is_active_;
« no previous file with comments | « content/renderer/render_view.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698