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

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

Issue 11360106: Browser Plugin: Implement AutoSize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 years, 1 month 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 #include "content/browser/browser_plugin/browser_plugin_embedder.h" 5 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "content/browser/browser_plugin/browser_plugin_embedder_helper.h" 8 #include "content/browser/browser_plugin/browser_plugin_embedder_helper.h"
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" 9 #include "content/browser/browser_plugin/browser_plugin_guest.h"
10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" 10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 int instance_id, 264 int instance_id,
265 WebKit::WebDragStatus drag_status, 265 WebKit::WebDragStatus drag_status,
266 const WebDropData& drop_data, 266 const WebDropData& drop_data,
267 WebKit::WebDragOperationsMask drag_mask, 267 WebKit::WebDragOperationsMask drag_mask,
268 const gfx::Point& location) { 268 const gfx::Point& location) {
269 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); 269 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id);
270 if (guest) 270 if (guest)
271 guest->DragStatusUpdate(drag_status, drop_data, drag_mask, location); 271 guest->DragStatusUpdate(drag_status, drop_data, drag_mask, location);
272 } 272 }
273 273
274 void BrowserPluginEmbedder::SetAutoSize(
275 int instance_id,
276 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params,
277 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) {
278 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id);
279 if (guest)
280 guest->SetAutoSize(auto_size_params, resize_guest_params);
281 }
282
274 void BrowserPluginEmbedder::Go(int instance_id, int relative_index) { 283 void BrowserPluginEmbedder::Go(int instance_id, int relative_index) {
275 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); 284 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id);
276 if (guest) 285 if (guest)
277 guest->Go(relative_index); 286 guest->Go(relative_index);
278 } 287 }
279 288
280 void BrowserPluginEmbedder::Stop(int instance_id) { 289 void BrowserPluginEmbedder::Stop(int instance_id) {
281 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); 290 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id);
282 if (guest) 291 if (guest)
283 guest->Stop(); 292 guest->Stop();
(...skipping 19 matching lines...) Expand all
303 bool visible = *Details<bool>(details).ptr(); 312 bool visible = *Details<bool>(details).ptr();
304 WebContentsVisibilityChanged(visible); 313 WebContentsVisibilityChanged(visible);
305 break; 314 break;
306 } 315 }
307 default: 316 default:
308 NOTREACHED() << "Unexpected notification type: " << type; 317 NOTREACHED() << "Unexpected notification type: " << type;
309 } 318 }
310 } 319 }
311 320
312 } // namespace content 321 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698