| 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 15 matching lines...) Expand all Loading... |
| 26 #include "base/memory/shared_memory.h" | 26 #include "base/memory/shared_memory.h" |
| 27 #include "base/memory/weak_ptr.h" | 27 #include "base/memory/weak_ptr.h" |
| 28 #include "base/values.h" | 28 #include "base/values.h" |
| 29 #include "content/common/edit_command.h" | 29 #include "content/common/edit_command.h" |
| 30 #include "content/port/common/input_event_ack_state.h" | 30 #include "content/port/common/input_event_ack_state.h" |
| 31 #include "content/public/browser/browser_plugin_guest_delegate.h" | 31 #include "content/public/browser/browser_plugin_guest_delegate.h" |
| 32 #include "content/public/browser/javascript_dialog_manager.h" | 32 #include "content/public/browser/javascript_dialog_manager.h" |
| 33 #include "content/public/browser/web_contents_delegate.h" | 33 #include "content/public/browser/web_contents_delegate.h" |
| 34 #include "content/public/browser/web_contents_observer.h" | 34 #include "content/public/browser/web_contents_observer.h" |
| 35 #include "content/public/common/browser_plugin_permission_type.h" | 35 #include "content/public/common/browser_plugin_permission_type.h" |
| 36 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
| 36 #include "third_party/WebKit/public/web/WebDragOperation.h" | 37 #include "third_party/WebKit/public/web/WebDragOperation.h" |
| 37 #include "third_party/WebKit/public/web/WebDragStatus.h" | 38 #include "third_party/WebKit/public/web/WebDragStatus.h" |
| 38 #include "third_party/WebKit/public/web/WebInputEvent.h" | 39 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 40 #include "ui/base/ime/text_input_mode.h" |
| 41 #include "ui/base/ime/text_input_type.h" |
| 39 #include "ui/gfx/rect.h" | 42 #include "ui/gfx/rect.h" |
| 40 #include "ui/surface/transport_dib.h" | 43 #include "ui/surface/transport_dib.h" |
| 41 | 44 |
| 42 struct BrowserPluginHostMsg_AutoSize_Params; | 45 struct BrowserPluginHostMsg_AutoSize_Params; |
| 43 struct BrowserPluginHostMsg_Attach_Params; | 46 struct BrowserPluginHostMsg_Attach_Params; |
| 44 struct BrowserPluginHostMsg_ResizeGuest_Params; | 47 struct BrowserPluginHostMsg_ResizeGuest_Params; |
| 45 struct ViewHostMsg_CreateWindow_Params; | 48 struct ViewHostMsg_CreateWindow_Params; |
| 46 #if defined(OS_MACOSX) | 49 #if defined(OS_MACOSX) |
| 47 struct ViewHostMsg_ShowPopup_Params; | 50 struct ViewHostMsg_ShowPopup_Params; |
| 48 #endif | 51 #endif |
| 49 struct ViewHostMsg_UpdateRect_Params; | 52 struct ViewHostMsg_UpdateRect_Params; |
| 50 class WebCursor; | 53 class WebCursor; |
| 51 | 54 |
| 52 namespace cc { | 55 namespace cc { |
| 53 class CompositorFrameAck; | 56 class CompositorFrameAck; |
| 54 } | 57 } |
| 55 | 58 |
| 56 namespace blink { | 59 namespace blink { |
| 57 class WebInputEvent; | 60 class WebInputEvent; |
| 58 } | 61 } |
| 59 | 62 |
| 63 namespace gfx { |
| 64 class Range; |
| 65 } |
| 66 |
| 60 namespace content { | 67 namespace content { |
| 61 | 68 |
| 62 class BrowserPluginHostFactory; | 69 class BrowserPluginHostFactory; |
| 63 class BrowserPluginEmbedder; | 70 class BrowserPluginEmbedder; |
| 64 class BrowserPluginGuestManager; | 71 class BrowserPluginGuestManager; |
| 65 class RenderProcessHost; | 72 class RenderProcessHost; |
| 66 class RenderWidgetHostView; | 73 class RenderWidgetHostView; |
| 67 class SiteInstance; | 74 class SiteInstance; |
| 68 struct DropData; | 75 struct DropData; |
| 69 struct MediaStreamRequest; | 76 struct MediaStreamRequest; |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 uint32 sync_point); | 456 uint32 sync_point); |
| 450 void OnUnlockMouse(); | 457 void OnUnlockMouse(); |
| 451 void OnUnlockMouseAck(int instance_id); | 458 void OnUnlockMouseAck(int instance_id); |
| 452 void OnUpdateGeometry(int instance_id, const gfx::Rect& view_rect); | 459 void OnUpdateGeometry(int instance_id, const gfx::Rect& view_rect); |
| 453 void OnUpdateRectACK( | 460 void OnUpdateRectACK( |
| 454 int instance_id, | 461 int instance_id, |
| 455 bool needs_ack, | 462 bool needs_ack, |
| 456 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, | 463 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, |
| 457 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params); | 464 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params); |
| 458 | 465 |
| 466 void OnTextInputTypeChanged(ui::TextInputType type, |
| 467 ui::TextInputMode input_mode, |
| 468 bool can_compose_inline); |
| 469 void OnImeSetComposition( |
| 470 int instance_id, |
| 471 const std::string& text, |
| 472 const std::vector<blink::WebCompositionUnderline>& underlines, |
| 473 int selection_start, |
| 474 int selection_end); |
| 475 void OnImeConfirmComposition( |
| 476 int instance_id, |
| 477 const std::string& text, |
| 478 bool keep_selection); |
| 479 void OnImeCancelComposition(); |
| 480 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) |
| 481 void OnImeCompositionRangeChanged( |
| 482 const gfx::Range& range, |
| 483 const std::vector<gfx::Rect>& character_bounds); |
| 484 #endif |
| 459 | 485 |
| 460 // Message handlers for messages from guest. | 486 // Message handlers for messages from guest. |
| 461 | 487 |
| 462 void OnDragStopped(); | 488 void OnDragStopped(); |
| 463 void OnHandleInputEventAck( | 489 void OnHandleInputEventAck( |
| 464 blink::WebInputEvent::Type event_type, | 490 blink::WebInputEvent::Type event_type, |
| 465 InputEventAckState ack_result); | 491 InputEventAckState ack_result); |
| 466 void OnHasTouchEventHandlers(bool accept); | 492 void OnHasTouchEventHandlers(bool accept); |
| 467 void OnSetCursor(const WebCursor& cursor); | 493 void OnSetCursor(const WebCursor& cursor); |
| 468 // On MacOSX popups are painted by the browser process. We handle them here | 494 // On MacOSX popups are painted by the browser process. We handle them here |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 // These are parameters passed from JavaScript on attachment to the content | 586 // These are parameters passed from JavaScript on attachment to the content |
| 561 // embedder. | 587 // embedder. |
| 562 scoped_ptr<base::DictionaryValue> extra_attach_params_; | 588 scoped_ptr<base::DictionaryValue> extra_attach_params_; |
| 563 | 589 |
| 564 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 590 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
| 565 }; | 591 }; |
| 566 | 592 |
| 567 } // namespace content | 593 } // namespace content |
| 568 | 594 |
| 569 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 595 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |