| Index: content/browser/browser_plugin/browser_plugin_guest.cc
|
| diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
|
| index f582394a4db477a3541333cfb841a12ce9d735dd..569c9deb00e379b37ee29622aeca7049ee56eb7e 100644
|
| --- a/content/browser/browser_plugin/browser_plugin_guest.cc
|
| +++ b/content/browser/browser_plugin/browser_plugin_guest.cc
|
| @@ -35,7 +35,6 @@
|
| #include "content/public/browser/user_metrics.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "content/public/common/drop_data.h"
|
| -#include "third_party/WebKit/public/platform/WebCursorInfo.h"
|
| #include "ui/gfx/geometry/size_conversions.h"
|
|
|
| #if defined(OS_MACOSX)
|
| @@ -108,6 +107,24 @@ base::WeakPtr<BrowserPluginGuest> BrowserPluginGuest::AsWeakPtr() {
|
| return weak_ptr_factory_.GetWeakPtr();
|
| }
|
|
|
| +void BrowserPluginGuest::SetFocus(RenderWidgetHost* rwh, bool focused) {
|
| + focused_ = focused;
|
| + rwh->Send(new InputMsg_SetFocus(rwh->GetRoutingID(), focused));
|
| + if (!focused && mouse_locked_)
|
| + OnUnlockMouse();
|
| +
|
| + // Restore the last seen state of text input to the view.
|
| + RenderWidgetHostViewBase* rwhv = static_cast<RenderWidgetHostViewBase*>(
|
| + web_contents()->GetRenderWidgetHostView());
|
| + if (rwhv) {
|
| + ViewHostMsg_TextInputState_Params params;
|
| + params.type = last_text_input_type_;
|
| + params.mode = last_input_mode_;
|
| + params.can_compose_inline = last_can_compose_inline_;
|
| + rwhv->TextInputStateChanged(params);
|
| + }
|
| +}
|
| +
|
| bool BrowserPluginGuest::LockMouse(bool allowed) {
|
| if (!attached() || (mouse_locked_ == allowed))
|
| return false;
|
| @@ -495,7 +512,6 @@ bool BrowserPluginGuest::OnMessageReceived(const IPC::Message& message) {
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_HasTouchEventHandlers,
|
| OnHasTouchEventHandlers)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnLockMouse)
|
| - IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnShowWidget)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
|
| @@ -702,21 +718,10 @@ void BrowserPluginGuest::OnResizeGuest(
|
|
|
| void BrowserPluginGuest::OnSetFocus(int browser_plugin_instance_id,
|
| bool focused) {
|
| - focused_ = focused;
|
| - Send(new InputMsg_SetFocus(routing_id(), focused));
|
| - if (!focused && mouse_locked_)
|
| - OnUnlockMouse();
|
|
|
| - // Restore the last seen state of text input to the view.
|
| - RenderWidgetHostViewBase* rwhv = static_cast<RenderWidgetHostViewBase*>(
|
| - web_contents()->GetRenderWidgetHostView());
|
| - if (rwhv) {
|
| - ViewHostMsg_TextInputState_Params params;
|
| - params.type = last_text_input_type_;
|
| - params.mode = last_input_mode_;
|
| - params.can_compose_inline = last_can_compose_inline_;
|
| - rwhv->TextInputStateChanged(params);
|
| - }
|
| + RenderWidgetHost* rwh = web_contents()->GetRenderWidgetHostView()->
|
| + GetRenderWidgetHost();
|
| + SetFocus(rwh, focused);
|
| }
|
|
|
| void BrowserPluginGuest::OnSetEditCommandsForNextKeyEvent(
|
| @@ -784,11 +789,6 @@ void BrowserPluginGuest::OnHasTouchEventHandlers(bool accept) {
|
| browser_plugin_instance_id(), accept));
|
| }
|
|
|
| -void BrowserPluginGuest::OnSetCursor(const WebCursor& cursor) {
|
| - SendMessageToEmbedder(
|
| - new BrowserPluginMsg_SetCursor(browser_plugin_instance_id(), cursor));
|
| -}
|
| -
|
| #if defined(OS_MACOSX)
|
| void BrowserPluginGuest::OnShowPopup(
|
| RenderFrameHost* render_frame_host,
|
|
|