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 // 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. Any | 9 // BrowserPluginGuest lives on the UI thread of the browser process. Any |
10 // messages about the guest render process that the embedder might be interested | 10 // messages about the guest render process that the embedder might be interested |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 // The is the routing ID for a swapped out RenderView for the guest | 389 // The is the routing ID for a swapped out RenderView for the guest |
390 // WebContents in the embedder's process. | 390 // WebContents in the embedder's process. |
391 int guest_proxy_routing_id_; | 391 int guest_proxy_routing_id_; |
392 // Last seen state of drag status update. | 392 // Last seen state of drag status update. |
393 blink::WebDragStatus last_drag_status_; | 393 blink::WebDragStatus last_drag_status_; |
394 // Whether or not our embedder has seen a SystemDragEnded() call. | 394 // Whether or not our embedder has seen a SystemDragEnded() call. |
395 bool seen_embedder_system_drag_ended_; | 395 bool seen_embedder_system_drag_ended_; |
396 // Whether or not our embedder has seen a DragSourceEndedAt() call. | 396 // Whether or not our embedder has seen a DragSourceEndedAt() call. |
397 bool seen_embedder_drag_source_ended_at_; | 397 bool seen_embedder_drag_source_ended_at_; |
398 | 398 |
| 399 // Indicates the URL dragged into the guest if any. |
| 400 GURL dragged_url_; |
| 401 |
399 // Guests generate frames and send a CompositorFrameSwapped (CFS) message | 402 // Guests generate frames and send a CompositorFrameSwapped (CFS) message |
400 // indicating the next frame is ready to be positioned and composited. | 403 // indicating the next frame is ready to be positioned and composited. |
401 // Subsequent frames are not generated until the IPC is ACKed. We would like | 404 // Subsequent frames are not generated until the IPC is ACKed. We would like |
402 // to ensure that the guest generates frames on attachment so we directly ACK | 405 // to ensure that the guest generates frames on attachment so we directly ACK |
403 // an unACKed CFS. ACKs could get lost between the time a guest is detached | 406 // an unACKed CFS. ACKs could get lost between the time a guest is detached |
404 // from a container and the time it is attached elsewhere. This mitigates this | 407 // from a container and the time it is attached elsewhere. This mitigates this |
405 // race by ensuring the guest is ACKed on attachment. | 408 // race by ensuring the guest is ACKed on attachment. |
406 scoped_ptr<FrameMsg_CompositorFrameSwapped_Params> last_pending_frame_; | 409 scoped_ptr<FrameMsg_CompositorFrameSwapped_Params> last_pending_frame_; |
407 | 410 |
408 // This is a queue of messages that are destined to be sent to the embedder | 411 // This is a queue of messages that are destined to be sent to the embedder |
409 // once the guest is attached to a particular embedder. | 412 // once the guest is attached to a particular embedder. |
410 std::deque<linked_ptr<IPC::Message> > pending_messages_; | 413 std::deque<linked_ptr<IPC::Message> > pending_messages_; |
411 | 414 |
412 BrowserPluginGuestDelegate* const delegate_; | 415 BrowserPluginGuestDelegate* const delegate_; |
413 | 416 |
414 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 417 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
415 // permission. | 418 // permission. |
416 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 419 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
417 | 420 |
418 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 421 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
419 }; | 422 }; |
420 | 423 |
421 } // namespace content | 424 } // namespace content |
422 | 425 |
423 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 426 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
OLD | NEW |