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) | 113 #if defined(OS_WIN) && !defined(USE_AURA) |
114 IPC_MESSAGE_HANDLER(PluginMsg_ImeCompositionUpdated, | 114 IPC_MESSAGE_HANDLER(PluginMsg_ImeCompositionUpdated, |
115 OnImeCompositionUpdated) | 115 OnImeCompositionUpdated) |
116 IPC_MESSAGE_HANDLER(PluginMsg_ImeCompositionCompleted, | 116 IPC_MESSAGE_HANDLER(PluginMsg_ImeCompositionCompleted, |
117 OnImeCompositionCompleted) | 117 OnImeCompositionCompleted) |
118 #endif | 118 #endif |
119 #if defined(OS_MACOSX) | 119 #if defined(OS_MACOSX) |
120 IPC_MESSAGE_HANDLER(PluginMsg_SetWindowFocus, OnSetWindowFocus) | 120 IPC_MESSAGE_HANDLER(PluginMsg_SetWindowFocus, OnSetWindowFocus) |
121 IPC_MESSAGE_HANDLER(PluginMsg_ContainerHidden, OnContainerHidden) | 121 IPC_MESSAGE_HANDLER(PluginMsg_ContainerHidden, OnContainerHidden) |
122 IPC_MESSAGE_HANDLER(PluginMsg_ContainerShown, OnContainerShown) | 122 IPC_MESSAGE_HANDLER(PluginMsg_ContainerShown, OnContainerShown) |
123 IPC_MESSAGE_HANDLER(PluginMsg_WindowFrameChanged, OnWindowFrameChanged) | 123 IPC_MESSAGE_HANDLER(PluginMsg_WindowFrameChanged, OnWindowFrameChanged) |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 bool success, | 323 bool success, |
324 int notify_id) { | 324 int notify_id) { |
325 delegate_->SendJavaScriptStream(url, result, success, notify_id); | 325 delegate_->SendJavaScriptStream(url, result, success, notify_id); |
326 } | 326 } |
327 | 327 |
328 void WebPluginDelegateStub::OnSetContentAreaFocus(bool has_focus) { | 328 void WebPluginDelegateStub::OnSetContentAreaFocus(bool has_focus) { |
329 if (delegate_) | 329 if (delegate_) |
330 delegate_->SetContentAreaHasFocus(has_focus); | 330 delegate_->SetContentAreaHasFocus(has_focus); |
331 } | 331 } |
332 | 332 |
333 #if defined(OS_WIN) | 333 #if defined(OS_WIN) && !defined(USE_AURA) |
334 void WebPluginDelegateStub::OnImeCompositionUpdated( | 334 void WebPluginDelegateStub::OnImeCompositionUpdated( |
335 const string16& text, | 335 const string16& text, |
336 const std::vector<int>& clauses, | 336 const std::vector<int>& clauses, |
337 const std::vector<int>& target, | 337 const std::vector<int>& target, |
338 int cursor_position) { | 338 int cursor_position) { |
339 if (delegate_) | 339 if (delegate_) |
340 delegate_->ImeCompositionUpdated(text, clauses, target, cursor_position); | 340 delegate_->ImeCompositionUpdated(text, clauses, target, cursor_position); |
341 #if defined(OS_WIN) | 341 #if defined(OS_WIN) && !defined(USE_AURA) |
342 webplugin_->UpdateIMEStatus(); | 342 webplugin_->UpdateIMEStatus(); |
343 #endif | 343 #endif |
344 } | 344 } |
345 | 345 |
346 void WebPluginDelegateStub::OnImeCompositionCompleted(const string16& text) { | 346 void WebPluginDelegateStub::OnImeCompositionCompleted(const string16& text) { |
347 if (delegate_) | 347 if (delegate_) |
348 delegate_->ImeCompositionCompleted(text); | 348 delegate_->ImeCompositionCompleted(text); |
349 } | 349 } |
350 #endif | 350 #endif |
351 | 351 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); | 417 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); |
418 webplugin_->OnResourceCreated(resource_id, resource_client); | 418 webplugin_->OnResourceCreated(resource_id, resource_client); |
419 } | 419 } |
420 | 420 |
421 #if defined(OS_MACOSX) | 421 #if defined(OS_MACOSX) |
422 void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle( | 422 void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle( |
423 gfx::PluginWindowHandle window) { | 423 gfx::PluginWindowHandle window) { |
424 delegate_->set_windowed_handle(window); | 424 delegate_->set_windowed_handle(window); |
425 } | 425 } |
426 #endif | 426 #endif |
OLD | NEW |