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

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

Issue 11094080: Browser Plugin: More robust recovery from guest crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed part of test that is no longer valid Created 8 years, 2 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
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_host_browsertest.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 (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 BrowserPluginGuest represents the browser side of browser <--> renderer 5 // A BrowserPluginGuest represents the browser side of browser <--> renderer
6 // communication. A BrowserPlugin (a WebPlugin) is on the renderer side of 6 // communication. A BrowserPlugin (a WebPlugin) is on the renderer side of
7 // browser <--> guest renderer communication. The 'guest' renderer is a 7 // browser <--> guest renderer communication. The 'guest' renderer is a
8 // <browser> tag. 8 // <browser> tag.
9 // 9 //
10 // BrowserPluginGuest lives on the UI thread of the browser process. It has a 10 // BrowserPluginGuest lives on the UI thread of the browser process. It has a
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // WebContentsDelegate implementation. 123 // WebContentsDelegate implementation.
124 virtual bool CanDownload(RenderViewHost* render_view_host, 124 virtual bool CanDownload(RenderViewHost* render_view_host,
125 int request_id, 125 int request_id,
126 const std::string& request_method) OVERRIDE; 126 const std::string& request_method) OVERRIDE;
127 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE; 127 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE;
128 virtual void RendererUnresponsive(WebContents* source) OVERRIDE; 128 virtual void RendererUnresponsive(WebContents* source) OVERRIDE;
129 129
130 void UpdateRect(RenderViewHost* render_view_host, 130 void UpdateRect(RenderViewHost* render_view_host,
131 const ViewHostMsg_UpdateRect_Params& params); 131 const ViewHostMsg_UpdateRect_Params& params);
132 void UpdateRectACK(int message_id, const gfx::Size& size); 132 void UpdateRectACK(int message_id, const gfx::Size& size);
133 // Handles input event routed through the embedder (which is initiated in the
134 // browser plugin (renderer side of the embedder)).
135 void HandleInputEvent(RenderViewHost* render_view_host,
136 const gfx::Rect& guest_rect,
137 const WebKit::WebInputEvent& event,
138 IPC::Message* reply_message);
139 // Overrides default ShowWidget message so we show them on the correct 133 // Overrides default ShowWidget message so we show them on the correct
140 // coordinates. 134 // coordinates.
141 void ShowWidget(RenderViewHost* render_view_host, 135 void ShowWidget(RenderViewHost* render_view_host,
142 int route_id, 136 int route_id,
143 const gfx::Rect& initial_pos); 137 const gfx::Rect& initial_pos);
144 void SetCursor(const WebCursor& cursor); 138 void SetCursor(const WebCursor& cursor);
145 // Handles input event acks so they are sent to browser plugin host (via 139 // Handles input event acks so they are sent to browser plugin host (via
146 // embedder) instead of default view/widget host. 140 // embedder) instead of default view/widget host.
147 void HandleInputEventAck(RenderViewHost* render_view_host, bool handled); 141 void HandleInputEventAck(RenderViewHost* render_view_host, bool handled);
148 142
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // so that the cursor updates properly. 177 // so that the cursor updates properly.
184 void UpdateDragCursor(WebKit::WebDragOperation operation); 178 void UpdateDragCursor(WebKit::WebDragOperation operation);
185 179
186 // Exposes the protected web_contents() from WebContentsObserver. 180 // Exposes the protected web_contents() from WebContentsObserver.
187 WebContents* GetWebContents(); 181 WebContents* GetWebContents();
188 182
189 // Kill the guest process. 183 // Kill the guest process.
190 void Terminate(); 184 void Terminate();
191 185
192 // Overridden in tests. 186 // Overridden in tests.
187 // Handles input event routed through the embedder (which is initiated in the
188 // browser plugin (renderer side of the embedder)).
189 virtual void HandleInputEvent(RenderViewHost* render_view_host,
190 const gfx::Rect& guest_rect,
191 const WebKit::WebInputEvent& event,
192 IPC::Message* reply_message);
193 virtual bool ViewTakeFocus(bool reverse); 193 virtual bool ViewTakeFocus(bool reverse);
194 // If possible, navigate the guest to |relative_index| entries away from the 194 // If possible, navigate the guest to |relative_index| entries away from the
195 // current navigation entry. 195 // current navigation entry.
196 virtual void Go(int relative_index); 196 virtual void Go(int relative_index);
197 // Overridden in tests. 197 // Overridden in tests.
198 virtual void SetFocus(bool focused); 198 virtual void SetFocus(bool focused);
199 // Reload the guest. 199 // Reload the guest.
200 virtual void Reload(); 200 virtual void Reload();
201 // Stop loading the guest. 201 // Stop loading the guest.
202 virtual void Stop(); 202 virtual void Stop();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 int pending_update_counter_; 258 int pending_update_counter_;
259 base::TimeDelta guest_hang_timeout_; 259 base::TimeDelta guest_hang_timeout_;
260 bool visible_; 260 bool visible_;
261 261
262 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 262 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
263 }; 263 };
264 264
265 } // namespace content 265 } // namespace content
266 266
267 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 267 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698