| OLD | NEW |
| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 int instance_id, | 236 int instance_id, |
| 237 WebKit::WebDragStatus drag_status, | 237 WebKit::WebDragStatus drag_status, |
| 238 const WebDropData& drop_data, | 238 const WebDropData& drop_data, |
| 239 WebKit::WebDragOperationsMask drag_mask, | 239 WebKit::WebDragOperationsMask drag_mask, |
| 240 const gfx::Point& location) { | 240 const gfx::Point& location) { |
| 241 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 241 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 242 if (guest) | 242 if (guest) |
| 243 guest->DragStatusUpdate(drag_status, drop_data, drag_mask, location); | 243 guest->DragStatusUpdate(drag_status, drop_data, drag_mask, location); |
| 244 } | 244 } |
| 245 | 245 |
| 246 void BrowserPluginEmbedder::SetAutoSize( |
| 247 int instance_id, |
| 248 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, |
| 249 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) { |
| 250 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 251 if (guest) |
| 252 guest->SetAutoSize(auto_size_params, resize_guest_params); |
| 253 } |
| 254 |
| 246 void BrowserPluginEmbedder::Go(int instance_id, int relative_index) { | 255 void BrowserPluginEmbedder::Go(int instance_id, int relative_index) { |
| 247 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 256 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 248 if (guest) | 257 if (guest) |
| 249 guest->Go(relative_index); | 258 guest->Go(relative_index); |
| 250 } | 259 } |
| 251 | 260 |
| 252 void BrowserPluginEmbedder::Stop(int instance_id) { | 261 void BrowserPluginEmbedder::Stop(int instance_id) { |
| 253 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 262 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 254 if (guest) | 263 if (guest) |
| 255 guest->Stop(); | 264 guest->Stop(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 275 bool visible = *Details<bool>(details).ptr(); | 284 bool visible = *Details<bool>(details).ptr(); |
| 276 WebContentsVisibilityChanged(visible); | 285 WebContentsVisibilityChanged(visible); |
| 277 break; | 286 break; |
| 278 } | 287 } |
| 279 default: | 288 default: |
| 280 NOTREACHED() << "Unexpected notification type: " << type; | 289 NOTREACHED() << "Unexpected notification type: " << type; |
| 281 } | 290 } |
| 282 } | 291 } |
| 283 | 292 |
| 284 } // namespace content | 293 } // namespace content |
| OLD | NEW |