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 11819015: Browser Plugin: Sort BrowserPluginGuest::OnSetSize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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_guest.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 is the browser side of a browser <--> embedder 5 // A BrowserPluginGuest is the browser side of a browser <--> embedder
6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder 6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder
7 // renderer side of browser <--> embedder renderer communication. 7 // renderer side of browser <--> embedder renderer communication.
8 // 8 //
9 // BrowserPluginGuest lives on the UI thread of the browser process. It has a 9 // BrowserPluginGuest lives on the UI thread of the browser process. It has a
10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The 10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // Overriden in tests. 210 // Overriden in tests.
211 virtual void OnHandleInputEvent(int instance_id, 211 virtual void OnHandleInputEvent(int instance_id,
212 const gfx::Rect& guest_window_rect, 212 const gfx::Rect& guest_window_rect,
213 const WebKit::WebInputEvent* event); 213 const WebKit::WebInputEvent* event);
214 // Reload the guest. Overriden in tests. 214 // Reload the guest. Overriden in tests.
215 virtual void OnReload(int instance_id); 215 virtual void OnReload(int instance_id);
216 // Grab the new damage buffer from the embedder, and resize the guest's 216 // Grab the new damage buffer from the embedder, and resize the guest's
217 // web contents. 217 // web contents.
218 void OnResizeGuest(int instance_id, 218 void OnResizeGuest(int instance_id,
219 const BrowserPluginHostMsg_ResizeGuest_Params& params); 219 const BrowserPluginHostMsg_ResizeGuest_Params& params);
220 // Overriden in tests.
221 virtual void OnSetFocus(int instance_id, bool focused);
220 // Updates the size state of the guest. 222 // Updates the size state of the guest.
221 void OnSetSize( 223 void OnSetSize(
222 int instance_id, 224 int instance_id,
223 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, 225 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params,
224 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params); 226 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params);
225 // Overriden in tests.
226 virtual void OnSetFocus(int instance_id, bool focused);
227 // The guest WebContents is visible if both its embedder is visible and 227 // The guest WebContents is visible if both its embedder is visible and
228 // the browser plugin element is visible. If either one is not then the 228 // the browser plugin element is visible. If either one is not then the
229 // WebContents is marked as hidden. A hidden WebContents will consume 229 // WebContents is marked as hidden. A hidden WebContents will consume
230 // fewer GPU and CPU resources. 230 // fewer GPU and CPU resources.
231 // 231 //
232 // When every WebContents in a RenderProcessHost is hidden, it will lower 232 // When every WebContents in a RenderProcessHost is hidden, it will lower
233 // the priority of the process (see RenderProcessHostImpl::WidgetHidden). 233 // the priority of the process (see RenderProcessHostImpl::WidgetHidden).
234 // 234 //
235 // It will also send a message to the guest renderer process to cleanup 235 // It will also send a message to the guest renderer process to cleanup
236 // resources such as dropping back buffers and adjusting memory limits (if in 236 // resources such as dropping back buffers and adjusting memory limits (if in
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 bool auto_size_enabled_; 293 bool auto_size_enabled_;
294 gfx::Size max_auto_size_; 294 gfx::Size max_auto_size_;
295 gfx::Size min_auto_size_; 295 gfx::Size min_auto_size_;
296 296
297 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 297 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
298 }; 298 };
299 299
300 } // namespace content 300 } // namespace content
301 301
302 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 302 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698