Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(860)

Side by Side Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 m_webPlugin->updateVisibility(false); 183 m_webPlugin->updateVisibility(false);
184 184
185 Widget::hide(); 185 Widget::hide();
186 } 186 }
187 187
188 void WebPluginContainerImpl::handleEvent(Event* event) 188 void WebPluginContainerImpl::handleEvent(Event* event)
189 { 189 {
190 if (!m_webPlugin->acceptsInputEvents()) 190 if (!m_webPlugin->acceptsInputEvents())
191 return; 191 return;
192 192
193 RefPtrWillBeRawPtr<WebPluginContainerImpl> protector(this); 193 RawPtr<WebPluginContainerImpl> protector(this);
194 // The events we pass are defined at: 194 // The events we pass are defined at:
195 // http://devedge-temp.mozilla.org/library/manuals/2002/plugin/1.0/struct ures5.html#1000000 195 // http://devedge-temp.mozilla.org/library/manuals/2002/plugin/1.0/struct ures5.html#1000000
196 // Don't take the documentation as truth, however. There are many cases 196 // Don't take the documentation as truth, however. There are many cases
197 // where mozilla behaves differently than the spec. 197 // where mozilla behaves differently than the spec.
198 if (event->isMouseEvent()) 198 if (event->isMouseEvent())
199 handleMouseEvent(toMouseEvent(event)); 199 handleMouseEvent(toMouseEvent(event));
200 else if (event->isWheelEvent()) 200 else if (event->isWheelEvent())
201 handleWheelEvent(toWheelEvent(event)); 201 handleWheelEvent(toWheelEvent(event));
202 else if (event->isKeyboardEvent()) 202 else if (event->isKeyboardEvent())
203 handleKeyboardEvent(toKeyboardEvent(event)); 203 handleKeyboardEvent(toKeyboardEvent(event));
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 return m_webPlugin->executeEditCommand(name, value); 382 return m_webPlugin->executeEditCommand(name, value);
383 } 383 }
384 384
385 WebElement WebPluginContainerImpl::element() 385 WebElement WebPluginContainerImpl::element()
386 { 386 {
387 return WebElement(m_element); 387 return WebElement(m_element);
388 } 388 }
389 389
390 void WebPluginContainerImpl::dispatchProgressEvent(const WebString& type, bool l engthComputable, unsigned long long loaded, unsigned long long total, const WebS tring& url) 390 void WebPluginContainerImpl::dispatchProgressEvent(const WebString& type, bool l engthComputable, unsigned long long loaded, unsigned long long total, const WebS tring& url)
391 { 391 {
392 RefPtrWillBeRawPtr<ProgressEvent> event; 392 RawPtr<ProgressEvent> event;
393 if (url.isEmpty()) { 393 if (url.isEmpty()) {
394 event = ProgressEvent::create(type, lengthComputable, loaded, total); 394 event = ProgressEvent::create(type, lengthComputable, loaded, total);
395 } else { 395 } else {
396 event = ResourceProgressEvent::create(type, lengthComputable, loaded, to tal, url); 396 event = ResourceProgressEvent::create(type, lengthComputable, loaded, to tal, url);
397 } 397 }
398 m_element->dispatchEvent(event.release()); 398 m_element->dispatchEvent(event.release());
399 } 399 }
400 400
401 void WebPluginContainerImpl::invalidate() 401 void WebPluginContainerImpl::invalidate()
402 { 402 {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 // 614 //
615 // It clearly has no scriptable object if in such a disposed state. 615 // It clearly has no scriptable object if in such a disposed state.
616 if (!m_webPlugin) 616 if (!m_webPlugin)
617 return v8::Local<v8::Object>(); 617 return v8::Local<v8::Object>();
618 #endif 618 #endif
619 619
620 // The plugin may be destroyed due to re-entrancy when calling 620 // The plugin may be destroyed due to re-entrancy when calling
621 // v8ScriptableObject below. crbug.com/458776. Hold a reference to the 621 // v8ScriptableObject below. crbug.com/458776. Hold a reference to the
622 // plugin container to prevent this from happening. For Oilpan, 'this' 622 // plugin container to prevent this from happening. For Oilpan, 'this'
623 // is already stack reachable, so redundant. 623 // is already stack reachable, so redundant.
624 RefPtrWillBeRawPtr<WebPluginContainerImpl> protector(this); 624 RawPtr<WebPluginContainerImpl> protector(this);
625 625
626 v8::Local<v8::Object> object = m_webPlugin->v8ScriptableObject(isolate); 626 v8::Local<v8::Object> object = m_webPlugin->v8ScriptableObject(isolate);
627 627
628 // If the plugin has been destroyed and the reference on the stack is the 628 // If the plugin has been destroyed and the reference on the stack is the
629 // only one left, then don't return the scriptable object. 629 // only one left, then don't return the scriptable object.
630 #if ENABLE(OILPAN) 630 #if ENABLE(OILPAN)
631 if (!m_webPlugin) 631 if (!m_webPlugin)
632 #else 632 #else
633 if (hasOneRef()) 633 if (hasOneRef())
634 #endif 634 #endif
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 // frame view. 963 // frame view.
964 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t); 964 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t);
965 } 965 }
966 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); 966 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects);
967 // Convert to the plugin position. 967 // Convert to the plugin position.
968 for (size_t i = 0; i < cutOutRects.size(); i++) 968 for (size_t i = 0; i < cutOutRects.size(); i++)
969 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 969 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
970 } 970 }
971 971
972 } // namespace blink 972 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698