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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_embedder.h

Issue 10917225: Browser Plugin: Reload and Stop operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments + merged with ToT/latest patch Created 8 years, 3 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // A BrowserPluginEmbedder has a list of guests it manages. 5 // A BrowserPluginEmbedder has a list of guests it manages.
6 // In the beginning when a renderer sees one or more guests (BrowserPlugin 6 // In the beginning when a renderer sees one or more guests (BrowserPlugin
7 // instance(s)) and there is a request to navigate to them, the WebContents for 7 // instance(s)) and there is a request to navigate to them, the WebContents for
8 // that renderer creates a BrowserPluginEmbedder for itself. The 8 // that renderer creates a BrowserPluginEmbedder for itself. The
9 // BrowserPluginEmbedder, in turn, manages a set of BrowserPluginGuests -- one 9 // BrowserPluginEmbedder, in turn, manages a set of BrowserPluginGuests -- one
10 // BrowserPluginGuest for each guest in the embedding WebContents. Note that 10 // BrowserPluginGuest for each guest in the embedding WebContents. Note that
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 bool resize_pending, 114 bool resize_pending,
115 float scale_factor); 115 float scale_factor);
116 // Handles input events sent from the BrowserPlugin (embedder's renderer 116 // Handles input events sent from the BrowserPlugin (embedder's renderer
117 // process) by passing them to appropriate guest's input handler. 117 // process) by passing them to appropriate guest's input handler.
118 void HandleInputEvent(int instance_id, 118 void HandleInputEvent(int instance_id,
119 RenderViewHost* render_view_host, 119 RenderViewHost* render_view_host,
120 const gfx::Rect& guest_rect, 120 const gfx::Rect& guest_rect,
121 const WebKit::WebInputEvent& event, 121 const WebKit::WebInputEvent& event,
122 IPC::Message* reply_message); 122 IPC::Message* reply_message);
123 void PluginDestroyed(int instance_id); 123 void PluginDestroyed(int instance_id);
124 void Stop(int instance_id);
125 void Reload(int instance_id);
124 126
125 // Called when visiblity of web_contents changes, so the embedder will 127 // Called when visiblity of web_contents changes, so the embedder will
126 // show/hide its guest. 128 // show/hide its guest.
127 void WebContentsVisibilityChanged(bool visible); 129 void WebContentsVisibilityChanged(bool visible);
128 130
129 // Static factory instance (always NULL for non-test). 131 // Static factory instance (always NULL for non-test).
130 static BrowserPluginHostFactory* factory_; 132 static BrowserPluginHostFactory* factory_;
131 133
132 // A scoped container for notification registries. 134 // A scoped container for notification registries.
133 NotificationRegistrar registrar_; 135 NotificationRegistrar registrar_;
134 136
135 // Contains guests' WebContents, mapping from their instance ids. 137 // Contains guests' WebContents, mapping from their instance ids.
136 ContainerInstanceMap guest_web_contents_by_instance_id_; 138 ContainerInstanceMap guest_web_contents_by_instance_id_;
137 RenderViewHost* render_view_host_; 139 RenderViewHost* render_view_host_;
138 140
139 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); 141 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder);
140 }; 142 };
141 143
142 } // namespace content 144 } // namespace content
143 145
144 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ 146 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698