| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 MSVC_PUSH_WARNING_LEVEL(0); | 10 MSVC_PUSH_WARNING_LEVEL(0); |
| (...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 // Skip all other mouse events. | 888 // Skip all other mouse events. |
| 889 return; | 889 return; |
| 890 } | 890 } |
| 891 | 891 |
| 892 // TODO(pkasting): http://b/1119691 This conditional seems exactly backwards, | 892 // TODO(pkasting): http://b/1119691 This conditional seems exactly backwards, |
| 893 // but it matches Safari's code, and if I reverse it, giving focus to a | 893 // but it matches Safari's code, and if I reverse it, giving focus to a |
| 894 // transparent (windowless) plugin fails. | 894 // transparent (windowless) plugin fails. |
| 895 WebCursor cursor; | 895 WebCursor cursor; |
| 896 if (!delegate_->HandleEvent(&np_event, &cursor)) | 896 if (!delegate_->HandleEvent(&np_event, &cursor)) |
| 897 event->setDefaultHandled(); | 897 event->setDefaultHandled(); |
| 898 |
| 899 ChromeClientImpl* chrome_client = |
| 900 static_cast<ChromeClientImpl*>( |
| 901 parent_view->frame()->page()->chrome()->client()); |
| 902 |
| 898 // A windowless plugin can change the cursor in response to the WM_MOUSEMOVE | 903 // A windowless plugin can change the cursor in response to the WM_MOUSEMOVE |
| 899 // event. We need to reflect the changed cursor in the frame view as the | 904 // event. We need to reflect the changed cursor in the frame view as the |
| 900 // mouse is moved in the boundaries of the windowless plugin. | 905 // mouse is moved in the boundaries of the windowless plugin. |
| 901 static_cast<ChromeClientImpl*>( | 906 chrome_client->SetCursorForPlugin(cursor); |
| 902 parent_view->frame()->page()->chrome()->client())->SetCursor(cursor); | 907 |
| 903 #else | 908 #else |
| 904 NOTIMPLEMENTED(); | 909 NOTIMPLEMENTED(); |
| 905 #endif | 910 #endif |
| 906 } | 911 } |
| 907 | 912 |
| 908 void WebPluginImpl::handleKeyboardEvent(WebCore::KeyboardEvent* event) { | 913 void WebPluginImpl::handleKeyboardEvent(WebCore::KeyboardEvent* event) { |
| 909 #if defined(OS_WIN) | 914 #if defined(OS_WIN) |
| 910 NPEvent np_event; | 915 NPEvent np_event; |
| 911 np_event.wParam = event->keyCode(); | 916 np_event.wParam = event->keyCode(); |
| 912 | 917 |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1435 client_index = clients_.erase(client_index); | 1440 client_index = clients_.erase(client_index); |
| 1436 if (resource_client) | 1441 if (resource_client) |
| 1437 resource_client->DidFail(); | 1442 resource_client->DidFail(); |
| 1438 } | 1443 } |
| 1439 | 1444 |
| 1440 // This needs to be called now and not in the destructor since the | 1445 // This needs to be called now and not in the destructor since the |
| 1441 // webframe_ might not be valid anymore. | 1446 // webframe_ might not be valid anymore. |
| 1442 webframe_->set_plugin_delegate(NULL); | 1447 webframe_->set_plugin_delegate(NULL); |
| 1443 webframe_ = NULL; | 1448 webframe_ = NULL; |
| 1444 } | 1449 } |
| OLD | NEW |