OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/plugin/webplugin_delegate_stub.h" | 5 #include "content/plugin/webplugin_delegate_stub.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 IPC_MESSAGE_HANDLER(PluginMsg_Paint, OnPaint) | 103 IPC_MESSAGE_HANDLER(PluginMsg_Paint, OnPaint) |
104 IPC_MESSAGE_HANDLER(PluginMsg_DidPaint, OnDidPaint) | 104 IPC_MESSAGE_HANDLER(PluginMsg_DidPaint, OnDidPaint) |
105 IPC_MESSAGE_HANDLER(PluginMsg_GetPluginScriptableObject, | 105 IPC_MESSAGE_HANDLER(PluginMsg_GetPluginScriptableObject, |
106 OnGetPluginScriptableObject) | 106 OnGetPluginScriptableObject) |
107 IPC_MESSAGE_HANDLER(PluginMsg_GetFormValue, OnGetFormValue) | 107 IPC_MESSAGE_HANDLER(PluginMsg_GetFormValue, OnGetFormValue) |
108 IPC_MESSAGE_HANDLER(PluginMsg_UpdateGeometry, OnUpdateGeometry) | 108 IPC_MESSAGE_HANDLER(PluginMsg_UpdateGeometry, OnUpdateGeometry) |
109 IPC_MESSAGE_HANDLER(PluginMsg_UpdateGeometrySync, OnUpdateGeometry) | 109 IPC_MESSAGE_HANDLER(PluginMsg_UpdateGeometrySync, OnUpdateGeometry) |
110 IPC_MESSAGE_HANDLER(PluginMsg_SendJavaScriptStream, | 110 IPC_MESSAGE_HANDLER(PluginMsg_SendJavaScriptStream, |
111 OnSendJavaScriptStream) | 111 OnSendJavaScriptStream) |
112 IPC_MESSAGE_HANDLER(PluginMsg_SetContentAreaFocus, OnSetContentAreaFocus) | 112 IPC_MESSAGE_HANDLER(PluginMsg_SetContentAreaFocus, OnSetContentAreaFocus) |
| 113 #if defined(OS_WIN) |
| 114 IPC_MESSAGE_HANDLER(PluginMsg_ImeCompositionUpdated, |
| 115 OnImeCompositionUpdated) |
| 116 IPC_MESSAGE_HANDLER(PluginMsg_ImeCompositionCompleted, |
| 117 OnImeCompositionCompleted) |
| 118 #endif |
113 #if defined(OS_MACOSX) | 119 #if defined(OS_MACOSX) |
114 IPC_MESSAGE_HANDLER(PluginMsg_SetWindowFocus, OnSetWindowFocus) | 120 IPC_MESSAGE_HANDLER(PluginMsg_SetWindowFocus, OnSetWindowFocus) |
115 IPC_MESSAGE_HANDLER(PluginMsg_ContainerHidden, OnContainerHidden) | 121 IPC_MESSAGE_HANDLER(PluginMsg_ContainerHidden, OnContainerHidden) |
116 IPC_MESSAGE_HANDLER(PluginMsg_ContainerShown, OnContainerShown) | 122 IPC_MESSAGE_HANDLER(PluginMsg_ContainerShown, OnContainerShown) |
117 IPC_MESSAGE_HANDLER(PluginMsg_WindowFrameChanged, OnWindowFrameChanged) | 123 IPC_MESSAGE_HANDLER(PluginMsg_WindowFrameChanged, OnWindowFrameChanged) |
118 IPC_MESSAGE_HANDLER(PluginMsg_ImeCompositionCompleted, | 124 IPC_MESSAGE_HANDLER(PluginMsg_ImeCompositionCompleted, |
119 OnImeCompositionCompleted) | 125 OnImeCompositionCompleted) |
120 #endif | 126 #endif |
121 IPC_MESSAGE_HANDLER(PluginMsg_DidReceiveManualResponse, | 127 IPC_MESSAGE_HANDLER(PluginMsg_DidReceiveManualResponse, |
122 OnDidReceiveManualResponse) | 128 OnDidReceiveManualResponse) |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 bool success, | 323 bool success, |
318 int notify_id) { | 324 int notify_id) { |
319 delegate_->SendJavaScriptStream(url, result, success, notify_id); | 325 delegate_->SendJavaScriptStream(url, result, success, notify_id); |
320 } | 326 } |
321 | 327 |
322 void WebPluginDelegateStub::OnSetContentAreaFocus(bool has_focus) { | 328 void WebPluginDelegateStub::OnSetContentAreaFocus(bool has_focus) { |
323 if (delegate_) | 329 if (delegate_) |
324 delegate_->SetContentAreaHasFocus(has_focus); | 330 delegate_->SetContentAreaHasFocus(has_focus); |
325 } | 331 } |
326 | 332 |
| 333 #if defined(OS_WIN) |
| 334 void WebPluginDelegateStub::OnImeCompositionUpdated( |
| 335 const string16& text, |
| 336 const std::vector<int>& clauses, |
| 337 const std::vector<int>& target, |
| 338 int cursor_position) { |
| 339 if (delegate_) |
| 340 delegate_->ImeCompositionUpdated(text, clauses, target, cursor_position); |
| 341 #if defined(OS_WIN) |
| 342 webplugin_->UpdateIMEStatus(); |
| 343 #endif |
| 344 } |
| 345 |
| 346 void WebPluginDelegateStub::OnImeCompositionCompleted(const string16& text) { |
| 347 if (delegate_) |
| 348 delegate_->ImeCompositionCompleted(text); |
| 349 } |
| 350 #endif |
| 351 |
327 #if defined(OS_MACOSX) | 352 #if defined(OS_MACOSX) |
328 void WebPluginDelegateStub::OnSetWindowFocus(bool has_focus) { | 353 void WebPluginDelegateStub::OnSetWindowFocus(bool has_focus) { |
329 if (delegate_) | 354 if (delegate_) |
330 delegate_->SetWindowHasFocus(has_focus); | 355 delegate_->SetWindowHasFocus(has_focus); |
331 } | 356 } |
332 | 357 |
333 void WebPluginDelegateStub::OnContainerHidden() { | 358 void WebPluginDelegateStub::OnContainerHidden() { |
334 if (delegate_) | 359 if (delegate_) |
335 delegate_->SetContainerVisibility(false); | 360 delegate_->SetContainerVisibility(false); |
336 } | 361 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); | 417 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); |
393 webplugin_->OnResourceCreated(resource_id, resource_client); | 418 webplugin_->OnResourceCreated(resource_id, resource_client); |
394 } | 419 } |
395 | 420 |
396 #if defined(OS_MACOSX) | 421 #if defined(OS_MACOSX) |
397 void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle( | 422 void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle( |
398 gfx::PluginWindowHandle window) { | 423 gfx::PluginWindowHandle window) { |
399 delegate_->set_windowed_handle(window); | 424 delegate_->set_windowed_handle(window); |
400 } | 425 } |
401 #endif | 426 #endif |
OLD | NEW |