| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 return false; | 520 return false; |
| 521 return (nodes.first().get() == m_element); | 521 return (nodes.first().get() == m_element); |
| 522 } | 522 } |
| 523 | 523 |
| 524 void WebPluginContainerImpl::requestTouchEventType(TouchEventRequestType request
Type) | 524 void WebPluginContainerImpl::requestTouchEventType(TouchEventRequestType request
Type) |
| 525 { | 525 { |
| 526 if (m_touchEventRequestType == requestType) | 526 if (m_touchEventRequestType == requestType) |
| 527 return; | 527 return; |
| 528 m_touchEventRequestType = requestType; | 528 m_touchEventRequestType = requestType; |
| 529 if (m_touchEventRequestType != TouchEventRequestTypeNone) | 529 if (m_touchEventRequestType != TouchEventRequestTypeNone) |
| 530 m_element->document()->didAddTouchEventHandler(m_element); | 530 m_element->document()->didAddTouchEventHandler(); |
| 531 else | 531 else |
| 532 m_element->document()->didRemoveTouchEventHandler(m_element); | 532 m_element->document()->didRemoveTouchEventHandler(); |
| 533 } | 533 } |
| 534 | 534 |
| 535 void WebPluginContainerImpl::setWantsWheelEvents(bool wantsWheelEvents) | 535 void WebPluginContainerImpl::setWantsWheelEvents(bool wantsWheelEvents) |
| 536 { | 536 { |
| 537 if (m_wantsWheelEvents == wantsWheelEvents) | 537 if (m_wantsWheelEvents == wantsWheelEvents) |
| 538 return; | 538 return; |
| 539 m_wantsWheelEvents = wantsWheelEvents; | 539 m_wantsWheelEvents = wantsWheelEvents; |
| 540 if (Page* page = m_element->document()->page()) { | 540 if (Page* page = m_element->document()->page()) { |
| 541 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordina
tor()) { | 541 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordina
tor()) { |
| 542 if (parent() && parent()->isFrameView()) | 542 if (parent() && parent()->isFrameView()) |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 #endif | 665 #endif |
| 666 , m_webLayer(0) | 666 , m_webLayer(0) |
| 667 , m_touchEventRequestType(TouchEventRequestTypeNone) | 667 , m_touchEventRequestType(TouchEventRequestTypeNone) |
| 668 , m_wantsWheelEvents(false) | 668 , m_wantsWheelEvents(false) |
| 669 { | 669 { |
| 670 } | 670 } |
| 671 | 671 |
| 672 WebPluginContainerImpl::~WebPluginContainerImpl() | 672 WebPluginContainerImpl::~WebPluginContainerImpl() |
| 673 { | 673 { |
| 674 if (m_touchEventRequestType != TouchEventRequestTypeNone) | 674 if (m_touchEventRequestType != TouchEventRequestTypeNone) |
| 675 m_element->document()->didRemoveTouchEventHandler(m_element); | 675 m_element->document()->didRemoveTouchEventHandler(); |
| 676 | 676 |
| 677 for (size_t i = 0; i < m_pluginLoadObservers.size(); ++i) | 677 for (size_t i = 0; i < m_pluginLoadObservers.size(); ++i) |
| 678 m_pluginLoadObservers[i]->clearPluginContainer(); | 678 m_pluginLoadObservers[i]->clearPluginContainer(); |
| 679 m_webPlugin->destroy(); | 679 m_webPlugin->destroy(); |
| 680 #if USE(ACCELERATED_COMPOSITING) | 680 #if USE(ACCELERATED_COMPOSITING) |
| 681 if (m_webLayer) | 681 if (m_webLayer) |
| 682 GraphicsLayerChromium::unregisterContentsLayer(m_webLayer); | 682 GraphicsLayerChromium::unregisterContentsLayer(m_webLayer); |
| 683 #endif | 683 #endif |
| 684 } | 684 } |
| 685 | 685 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 // Take our element and get the clip rect from the enclosing layer and | 883 // Take our element and get the clip rect from the enclosing layer and |
| 884 // frame view. | 884 // frame view. |
| 885 clipRect.intersect( | 885 clipRect.intersect( |
| 886 m_element->document()->view()->windowClipRectForFrameOwner(m_element
, true)); | 886 m_element->document()->view()->windowClipRectForFrameOwner(m_element
, true)); |
| 887 } | 887 } |
| 888 | 888 |
| 889 return clipRect; | 889 return clipRect; |
| 890 } | 890 } |
| 891 | 891 |
| 892 } // namespace WebKit | 892 } // namespace WebKit |
| OLD | NEW |