| 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 |
| 11 // in receiving should be listened for here. | 11 // in receiving should be listened for here. |
| 12 // | 12 // |
| 13 // BrowserPluginGuest is a WebContentsDelegate and WebContentsObserver for the | 13 // BrowserPluginGuest is a WebContentsDelegate and WebContentsObserver for the |
| 14 // guest WebContents. BrowserPluginGuest operates under the assumption that the | 14 // guest WebContents. BrowserPluginGuest operates under the assumption that the |
| 15 // guest will be accessible through only one RenderViewHost for the lifetime of | 15 // guest will be accessible through only one RenderViewHost for the lifetime of |
| 16 // the guest WebContents. Thus, cross-process navigation is not supported. | 16 // the guest WebContents. Thus, cross-process navigation is not supported. |
| 17 | 17 |
| 18 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 18 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
| 19 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 19 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
| 20 | 20 |
| 21 #include <map> | 21 #include <map> |
| 22 #include <queue> | 22 #include <queue> |
| 23 | 23 |
| 24 #include "base/compiler_specific.h" | 24 #include "base/compiler_specific.h" |
| 25 #include "base/id_map.h" | |
| 26 #include "base/memory/shared_memory.h" | |
| 27 #include "base/memory/weak_ptr.h" | 25 #include "base/memory/weak_ptr.h" |
| 28 #include "base/values.h" | 26 #include "base/values.h" |
| 29 #include "content/common/edit_command.h" | 27 #include "content/common/edit_command.h" |
| 30 #include "content/port/common/input_event_ack_state.h" | 28 #include "content/port/common/input_event_ack_state.h" |
| 31 #include "content/public/browser/browser_plugin_guest_delegate.h" | 29 #include "content/public/browser/browser_plugin_guest_delegate.h" |
| 32 #include "content/public/browser/web_contents_delegate.h" | 30 #include "content/public/browser/web_contents_delegate.h" |
| 33 #include "content/public/browser/web_contents_observer.h" | 31 #include "content/public/browser/web_contents_observer.h" |
| 34 #include "content/public/common/browser_plugin_permission_type.h" | 32 #include "content/public/common/browser_plugin_permission_type.h" |
| 35 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 33 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
| 36 #include "third_party/WebKit/public/web/WebDragOperation.h" | 34 #include "third_party/WebKit/public/web/WebDragOperation.h" |
| 37 #include "third_party/WebKit/public/web/WebDragStatus.h" | 35 #include "third_party/WebKit/public/web/WebDragStatus.h" |
| 38 #include "third_party/WebKit/public/web/WebInputEvent.h" | 36 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 39 #include "ui/base/ime/text_input_mode.h" | 37 #include "ui/base/ime/text_input_mode.h" |
| 40 #include "ui/base/ime/text_input_type.h" | 38 #include "ui/base/ime/text_input_type.h" |
| 41 #include "ui/gfx/rect.h" | 39 #include "ui/gfx/rect.h" |
| 42 #include "ui/surface/transport_dib.h" | 40 #include "ui/surface/transport_dib.h" |
| 43 | 41 |
| 44 struct BrowserPluginHostMsg_AutoSize_Params; | 42 struct BrowserPluginHostMsg_AutoSize_Params; |
| 45 struct BrowserPluginHostMsg_Attach_Params; | 43 struct BrowserPluginHostMsg_Attach_Params; |
| 46 struct BrowserPluginHostMsg_ResizeGuest_Params; | 44 struct BrowserPluginHostMsg_ResizeGuest_Params; |
| 47 struct FrameHostMsg_BuffersSwappedACK_Params; | |
| 48 struct FrameHostMsg_CompositorFrameSwappedACK_Params; | 45 struct FrameHostMsg_CompositorFrameSwappedACK_Params; |
| 49 struct FrameHostMsg_ReclaimCompositorResources_Params; | 46 struct FrameHostMsg_ReclaimCompositorResources_Params; |
| 50 struct ViewHostMsg_CreateWindow_Params; | |
| 51 #if defined(OS_MACOSX) | 47 #if defined(OS_MACOSX) |
| 52 struct ViewHostMsg_ShowPopup_Params; | 48 struct ViewHostMsg_ShowPopup_Params; |
| 53 #endif | 49 #endif |
| 54 struct ViewHostMsg_UpdateRect_Params; | 50 struct ViewHostMsg_UpdateRect_Params; |
| 55 | 51 |
| 56 namespace cc { | |
| 57 class CompositorFrameAck; | |
| 58 } | |
| 59 | |
| 60 namespace blink { | 52 namespace blink { |
| 61 class WebInputEvent; | 53 class WebInputEvent; |
| 62 } | 54 } |
| 63 | 55 |
| 64 namespace gfx { | 56 namespace gfx { |
| 65 class Range; | 57 class Range; |
| 66 } | 58 } |
| 67 | 59 |
| 68 namespace gpu { | |
| 69 struct Mailbox; | |
| 70 } | |
| 71 | |
| 72 namespace content { | 60 namespace content { |
| 73 | 61 |
| 74 class BrowserPluginHostFactory; | 62 class BrowserPluginHostFactory; |
| 75 class BrowserPluginEmbedder; | |
| 76 class BrowserPluginGuestManager; | |
| 77 class RenderProcessHost; | |
| 78 class RenderWidgetHostView; | 63 class RenderWidgetHostView; |
| 79 class SiteInstance; | 64 class SiteInstance; |
| 80 class WebCursor; | 65 class WebCursor; |
| 81 struct DropData; | 66 struct DropData; |
| 82 struct MediaStreamRequest; | 67 struct MediaStreamRequest; |
| 83 | 68 |
| 84 // A browser plugin guest provides functionality for WebContents to operate in | 69 // A browser plugin guest provides functionality for WebContents to operate in |
| 85 // the guest role and implements guest-specific overrides for ViewHostMsg_* | 70 // the guest role and implements guest-specific overrides for ViewHostMsg_* |
| 86 // messages. | 71 // messages. |
| 87 // | 72 // |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 WebContentsImpl* embedder_web_contents() const { | 127 WebContentsImpl* embedder_web_contents() const { |
| 143 return embedder_web_contents_; | 128 return embedder_web_contents_; |
| 144 } | 129 } |
| 145 | 130 |
| 146 // Returns the embedder's RenderWidgetHostView if it is available. | 131 // Returns the embedder's RenderWidgetHostView if it is available. |
| 147 // Returns NULL otherwise. | 132 // Returns NULL otherwise. |
| 148 RenderWidgetHostView* GetEmbedderRenderWidgetHostView(); | 133 RenderWidgetHostView* GetEmbedderRenderWidgetHostView(); |
| 149 | 134 |
| 150 bool focused() const { return focused_; } | 135 bool focused() const { return focused_; } |
| 151 bool visible() const { return guest_visible_; } | 136 bool visible() const { return guest_visible_; } |
| 152 void clear_damage_buffer() { damage_buffer_.reset(); } | |
| 153 bool is_in_destruction() { return is_in_destruction_; } | 137 bool is_in_destruction() { return is_in_destruction_; } |
| 154 | 138 |
| 155 BrowserPluginGuest* opener() const { return opener_.get(); } | 139 BrowserPluginGuest* opener() const { return opener_.get(); } |
| 156 | 140 |
| 157 // Returns whether the mouse pointer was unlocked. | 141 // Returns whether the mouse pointer was unlocked. |
| 158 bool UnlockMouseIfNecessary(const NativeWebKeyboardEvent& event); | 142 bool UnlockMouseIfNecessary(const NativeWebKeyboardEvent& event); |
| 159 | 143 |
| 160 void UpdateVisibility(); | 144 void UpdateVisibility(); |
| 161 | 145 |
| 162 void CopyFromCompositingSurface( | 146 void CopyFromCompositingSurface( |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 WebContents* web_contents, | 215 WebContents* web_contents, |
| 232 const MediaStreamRequest& request, | 216 const MediaStreamRequest& request, |
| 233 const MediaResponseCallback& callback) OVERRIDE; | 217 const MediaResponseCallback& callback) OVERRIDE; |
| 234 virtual bool PreHandleGestureEvent( | 218 virtual bool PreHandleGestureEvent( |
| 235 content::WebContents* source, | 219 content::WebContents* source, |
| 236 const blink::WebGestureEvent& event) OVERRIDE; | 220 const blink::WebGestureEvent& event) OVERRIDE; |
| 237 | 221 |
| 238 // Exposes the protected web_contents() from WebContentsObserver. | 222 // Exposes the protected web_contents() from WebContentsObserver. |
| 239 WebContentsImpl* GetWebContents(); | 223 WebContentsImpl* GetWebContents(); |
| 240 | 224 |
| 241 // Overridden in tests. | |
| 242 virtual void SetDamageBuffer( | |
| 243 const BrowserPluginHostMsg_ResizeGuest_Params& params); | |
| 244 | |
| 245 gfx::Point GetScreenCoordinates(const gfx::Point& relative_position) const; | 225 gfx::Point GetScreenCoordinates(const gfx::Point& relative_position) const; |
| 246 | 226 |
| 247 // Helper to send messages to embedder. This methods fills the message with | 227 // Helper to send messages to embedder. This methods fills the message with |
| 248 // the correct routing id. | 228 // the correct routing id. |
| 249 // Overridden in test implementation since we want to intercept certain | 229 // Overridden in test implementation since we want to intercept certain |
| 250 // messages for testing. | 230 // messages for testing. |
| 251 virtual void SendMessageToEmbedder(IPC::Message* msg); | 231 virtual void SendMessageToEmbedder(IPC::Message* msg); |
| 252 | 232 |
| 253 // Returns whether the guest is attached to an embedder. | 233 // Returns whether the guest is attached to an embedder. |
| 254 bool attached() const { return embedder_web_contents_ != NULL; } | 234 bool attached() const { return embedder_web_contents_ != NULL; } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 // Returns the |request_id| generated for the |request| provided. | 312 // Returns the |request_id| generated for the |request| provided. |
| 333 void RequestPermission( | 313 void RequestPermission( |
| 334 BrowserPluginPermissionType permission_type, | 314 BrowserPluginPermissionType permission_type, |
| 335 scoped_refptr<BrowserPluginGuest::PermissionRequest> request, | 315 scoped_refptr<BrowserPluginGuest::PermissionRequest> request, |
| 336 const base::DictionaryValue& request_info); | 316 const base::DictionaryValue& request_info); |
| 337 | 317 |
| 338 // Creates a new guest window, and BrowserPluginGuest that is owned by this | 318 // Creates a new guest window, and BrowserPluginGuest that is owned by this |
| 339 // BrowserPluginGuest. | 319 // BrowserPluginGuest. |
| 340 BrowserPluginGuest* CreateNewGuestWindow(const OpenURLParams& params); | 320 BrowserPluginGuest* CreateNewGuestWindow(const OpenURLParams& params); |
| 341 | 321 |
| 342 base::SharedMemory* damage_buffer() const { return damage_buffer_.get(); } | |
| 343 const gfx::Size& damage_view_size() const { return damage_view_size_; } | |
| 344 float damage_buffer_scale_factor() const { | |
| 345 return damage_buffer_scale_factor_; | |
| 346 } | |
| 347 // Returns the damage buffer corresponding to the handle in resize |params|. | |
| 348 base::SharedMemory* GetDamageBufferFromEmbedder( | |
| 349 const BrowserPluginHostMsg_ResizeGuest_Params& params); | |
| 350 | |
| 351 bool InAutoSizeBounds(const gfx::Size& size) const; | 322 bool InAutoSizeBounds(const gfx::Size& size) const; |
| 352 | 323 |
| 353 void RequestNewWindowPermission(WindowOpenDisposition disposition, | 324 void RequestNewWindowPermission(WindowOpenDisposition disposition, |
| 354 const gfx::Rect& initial_bounds, | 325 const gfx::Rect& initial_bounds, |
| 355 bool user_gesture, | 326 bool user_gesture, |
| 356 WebContentsImpl* new_contents); | 327 WebContentsImpl* new_contents); |
| 357 | 328 |
| 358 // Message handlers for messages from embedder. | 329 // Message handlers for messages from embedder. |
| 359 | 330 |
| 360 void OnCompositorFrameSwappedACK( | 331 void OnCompositorFrameSwappedACK( |
| (...skipping 14 matching lines...) Expand all Loading... |
| 375 const gfx::Point& location); | 346 const gfx::Point& location); |
| 376 // Instructs the guest to execute an edit command decoded in the embedder. | 347 // Instructs the guest to execute an edit command decoded in the embedder. |
| 377 void OnExecuteEditCommand(int instance_id, | 348 void OnExecuteEditCommand(int instance_id, |
| 378 const std::string& command); | 349 const std::string& command); |
| 379 | 350 |
| 380 // Returns compositor resources reclaimed in the embedder to the guest. | 351 // Returns compositor resources reclaimed in the embedder to the guest. |
| 381 void OnReclaimCompositorResources( | 352 void OnReclaimCompositorResources( |
| 382 int instance_id, | 353 int instance_id, |
| 383 const FrameHostMsg_ReclaimCompositorResources_Params& params); | 354 const FrameHostMsg_ReclaimCompositorResources_Params& params); |
| 384 | 355 |
| 385 // Overriden in tests. | 356 // Overridden in tests. |
| 386 virtual void OnHandleInputEvent(int instance_id, | 357 virtual void OnHandleInputEvent(int instance_id, |
| 387 const gfx::Rect& guest_window_rect, | 358 const gfx::Rect& guest_window_rect, |
| 388 const blink::WebInputEvent* event); | 359 const blink::WebInputEvent* event); |
| 389 void OnLockMouse(bool user_gesture, | 360 void OnLockMouse(bool user_gesture, |
| 390 bool last_unlocked_by_target, | 361 bool last_unlocked_by_target, |
| 391 bool privileged); | 362 bool privileged); |
| 392 void OnLockMouseAck(int instance_id, bool succeeded); | 363 void OnLockMouseAck(int instance_id, bool succeeded); |
| 393 void OnNavigateGuest(int instance_id, const std::string& src); | 364 void OnNavigateGuest(int instance_id, const std::string& src); |
| 394 void OnPluginDestroyed(int instance_id); | 365 void OnPluginDestroyed(int instance_id); |
| 395 // Grab the new damage buffer from the embedder, and resize the guest's | 366 // Resizes the guest's web contents. |
| 396 // web contents. | 367 // Overridden in tests. |
| 397 void OnResizeGuest(int instance_id, | 368 virtual void OnResizeGuest( |
| 398 const BrowserPluginHostMsg_ResizeGuest_Params& params); | 369 int instance_id, const BrowserPluginHostMsg_ResizeGuest_Params& params); |
| 399 // Overriden in tests. | 370 // Overridden in tests. |
| 400 virtual void OnSetFocus(int instance_id, bool focused); | 371 virtual void OnSetFocus(int instance_id, bool focused); |
| 401 // Sets the name of the guest so that other guests in the same partition can | 372 // Sets the name of the guest so that other guests in the same partition can |
| 402 // access it. | 373 // access it. |
| 403 void OnSetName(int instance_id, const std::string& name); | 374 void OnSetName(int instance_id, const std::string& name); |
| 404 // Updates the size state of the guest. | 375 // Updates the size state of the guest. |
| 405 void OnSetSize( | 376 void OnSetSize( |
| 406 int instance_id, | 377 int instance_id, |
| 407 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, | 378 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, |
| 408 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params); | 379 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params); |
| 409 void OnSetEditCommandsForNextKeyEvent( | 380 void OnSetEditCommandsForNextKeyEvent( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 422 // resources such as dropping back buffers and adjusting memory limits (if in | 393 // resources such as dropping back buffers and adjusting memory limits (if in |
| 423 // compositing mode, see CCLayerTreeHost::setVisible). | 394 // compositing mode, see CCLayerTreeHost::setVisible). |
| 424 // | 395 // |
| 425 // Additionally, it will slow down Javascript execution and garbage | 396 // Additionally, it will slow down Javascript execution and garbage |
| 426 // collection. See RenderThreadImpl::IdleHandler (executed when hidden) and | 397 // collection. See RenderThreadImpl::IdleHandler (executed when hidden) and |
| 427 // RenderThreadImpl::IdleHandlerInForegroundTab (executed when visible). | 398 // RenderThreadImpl::IdleHandlerInForegroundTab (executed when visible). |
| 428 void OnSetVisibility(int instance_id, bool visible); | 399 void OnSetVisibility(int instance_id, bool visible); |
| 429 void OnUnlockMouse(); | 400 void OnUnlockMouse(); |
| 430 void OnUnlockMouseAck(int instance_id); | 401 void OnUnlockMouseAck(int instance_id); |
| 431 void OnUpdateGeometry(int instance_id, const gfx::Rect& view_rect); | 402 void OnUpdateGeometry(int instance_id, const gfx::Rect& view_rect); |
| 432 void OnUpdateRectACK( | |
| 433 int instance_id, | |
| 434 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, | |
| 435 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params); | |
| 436 | 403 |
| 437 void OnTextInputTypeChanged(ui::TextInputType type, | 404 void OnTextInputTypeChanged(ui::TextInputType type, |
| 438 ui::TextInputMode input_mode, | 405 ui::TextInputMode input_mode, |
| 439 bool can_compose_inline); | 406 bool can_compose_inline); |
| 440 void OnImeSetComposition( | 407 void OnImeSetComposition( |
| 441 int instance_id, | 408 int instance_id, |
| 442 const std::string& text, | 409 const std::string& text, |
| 443 const std::vector<blink::WebCompositionUnderline>& underlines, | 410 const std::vector<blink::WebCompositionUnderline>& underlines, |
| 444 int selection_start, | 411 int selection_start, |
| 445 int selection_end); | 412 int selection_end); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 463 blink::WebInputEvent::Type event_type, | 430 blink::WebInputEvent::Type event_type, |
| 464 InputEventAckState ack_result); | 431 InputEventAckState ack_result); |
| 465 void OnHasTouchEventHandlers(bool accept); | 432 void OnHasTouchEventHandlers(bool accept); |
| 466 void OnSetCursor(const WebCursor& cursor); | 433 void OnSetCursor(const WebCursor& cursor); |
| 467 // On MacOSX popups are painted by the browser process. We handle them here | 434 // On MacOSX popups are painted by the browser process. We handle them here |
| 468 // so that they are positioned correctly. | 435 // so that they are positioned correctly. |
| 469 #if defined(OS_MACOSX) | 436 #if defined(OS_MACOSX) |
| 470 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); | 437 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); |
| 471 #endif | 438 #endif |
| 472 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); | 439 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); |
| 473 // Overriden in tests. | 440 // Overridden in tests. |
| 474 virtual void OnTakeFocus(bool reverse); | 441 virtual void OnTakeFocus(bool reverse); |
| 475 void OnUpdateFrameName(int frame_id, | 442 void OnUpdateFrameName(int frame_id, |
| 476 bool is_top_level, | 443 bool is_top_level, |
| 477 const std::string& name); | 444 const std::string& name); |
| 478 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 445 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
| 479 | 446 |
| 480 // Requests download permission through embedder JavaScript API after | 447 // Requests download permission through embedder JavaScript API after |
| 481 // retrieving url information from IO thread. | 448 // retrieving url information from IO thread. |
| 482 void DidRetrieveDownloadURLFromRequestId( | 449 void DidRetrieveDownloadURLFromRequestId( |
| 483 const std::string& request_method, | 450 const std::string& request_method, |
| 484 const base::Callback<void(bool)>& callback, | 451 const base::Callback<void(bool)>& callback, |
| 485 const GURL& url); | 452 const GURL& url); |
| 486 | 453 |
| 487 // Forwards all messages from the |pending_messages_| queue to the embedder. | 454 // Forwards all messages from the |pending_messages_| queue to the embedder. |
| 488 void SendQueuedMessages(); | 455 void SendQueuedMessages(); |
| 489 | 456 |
| 490 // Static factory instance (always NULL for non-test). | 457 // Static factory instance (always NULL for non-test). |
| 491 static BrowserPluginHostFactory* factory_; | 458 static BrowserPluginHostFactory* factory_; |
| 492 | 459 |
| 493 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_; | 460 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_; |
| 494 WebContentsImpl* embedder_web_contents_; | 461 WebContentsImpl* embedder_web_contents_; |
| 495 | 462 |
| 496 // An identifier that uniquely identifies a browser plugin guest within an | 463 // An identifier that uniquely identifies a browser plugin guest within an |
| 497 // embedder. | 464 // embedder. |
| 498 int instance_id_; | 465 int instance_id_; |
| 499 scoped_ptr<base::SharedMemory> damage_buffer_; | |
| 500 // An identifier that uniquely identifies a damage buffer. | |
| 501 uint32 damage_buffer_sequence_id_; | |
| 502 size_t damage_buffer_size_; | |
| 503 gfx::Size damage_view_size_; | |
| 504 float damage_buffer_scale_factor_; | |
| 505 float guest_device_scale_factor_; | 466 float guest_device_scale_factor_; |
| 506 gfx::Rect guest_window_rect_; | 467 gfx::Rect guest_window_rect_; |
| 507 gfx::Rect guest_screen_rect_; | 468 gfx::Rect guest_screen_rect_; |
| 508 base::TimeDelta guest_hang_timeout_; | 469 base::TimeDelta guest_hang_timeout_; |
| 509 bool focused_; | 470 bool focused_; |
| 510 bool mouse_locked_; | 471 bool mouse_locked_; |
| 511 bool pending_lock_request_; | 472 bool pending_lock_request_; |
| 512 bool guest_visible_; | 473 bool guest_visible_; |
| 513 bool guest_opaque_; | 474 bool guest_opaque_; |
| 514 bool embedder_visible_; | 475 bool embedder_visible_; |
| 515 std::string name_; | 476 std::string name_; |
| 516 bool auto_size_enabled_; | 477 bool auto_size_enabled_; |
| 517 gfx::Size max_auto_size_; | 478 gfx::Size max_auto_size_; |
| 518 gfx::Size min_auto_size_; | 479 gfx::Size min_auto_size_; |
| 480 gfx::Size full_size_; |
| 519 | 481 |
| 520 // Each copy-request is identified by a unique number. The unique number is | 482 // Each copy-request is identified by a unique number. The unique number is |
| 521 // used to keep track of the right callback. | 483 // used to keep track of the right callback. |
| 522 int copy_request_id_; | 484 int copy_request_id_; |
| 523 typedef base::Callback<void(bool, const SkBitmap&)> CopyRequestCallback; | 485 typedef base::Callback<void(bool, const SkBitmap&)> CopyRequestCallback; |
| 524 typedef std::map<int, const CopyRequestCallback> CopyRequestMap; | 486 typedef std::map<int, const CopyRequestCallback> CopyRequestMap; |
| 525 CopyRequestMap copy_request_callbacks_; | 487 CopyRequestMap copy_request_callbacks_; |
| 526 | 488 |
| 527 typedef std::map<BrowserPluginGuest*, NewWindowInfo> PendingWindowMap; | 489 typedef std::map<BrowserPluginGuest*, NewWindowInfo> PendingWindowMap; |
| 528 PendingWindowMap pending_new_windows_; | 490 PendingWindowMap pending_new_windows_; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 527 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
| 566 // permission. | 528 // permission. |
| 567 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 529 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
| 568 | 530 |
| 569 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 531 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
| 570 }; | 532 }; |
| 571 | 533 |
| 572 } // namespace content | 534 } // namespace content |
| 573 | 535 |
| 574 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 536 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |