Chromium Code Reviews| 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 20 matching lines...) Expand all Loading... | |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "web/WebPluginLoadObserver.h" | 32 #include "web/WebPluginLoadObserver.h" |
| 33 | 33 |
| 34 #include "public/web/WebPlugin.h" | 34 #include "public/web/WebPlugin.h" |
| 35 #include "web/WebPluginContainerImpl.h" | 35 #include "web/WebPluginContainerImpl.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 WebPluginLoadObserver::~WebPluginLoadObserver() | 39 WebPluginLoadObserver::~WebPluginLoadObserver() |
| 40 { | 40 { |
| 41 if (m_pluginContainer) | 41 #if !ENABLE(OILPAN) |
|
haraken
2015/11/12 15:51:00
Can we add ASSERT(!m_pluginContainer) to ENABLE(OI
sof
2015/11/12 18:15:35
Don't think so; with this and WebPluginContainerIm
| |
| 42 m_pluginContainer->willDestroyPluginLoadObserver(this); | 42 dispose(); |
| 43 #endif | |
| 44 } | |
| 45 | |
| 46 void WebPluginLoadObserver::dispose() | |
| 47 { | |
| 48 if (!m_pluginContainer) | |
| 49 return; | |
| 50 | |
| 51 m_pluginContainer->willDestroyPluginLoadObserver(this); | |
| 52 m_pluginContainer = nullptr; | |
| 53 } | |
| 54 | |
| 55 DEFINE_TRACE(WebPluginLoadObserver) | |
| 56 { | |
| 57 visitor->trace(m_pluginContainer); | |
| 43 } | 58 } |
| 44 | 59 |
| 45 void WebPluginLoadObserver::didFinishLoading() | 60 void WebPluginLoadObserver::didFinishLoading() |
| 46 { | 61 { |
| 47 if (m_pluginContainer) | 62 if (m_pluginContainer) |
| 48 m_pluginContainer->plugin()->didFinishLoadingFrameRequest(m_notifyURL, m _notifyData); | 63 m_pluginContainer->plugin()->didFinishLoadingFrameRequest(m_notifyURL, m _notifyData); |
| 49 } | 64 } |
| 50 | 65 |
| 51 void WebPluginLoadObserver::didFailLoading(const WebURLError& error) | 66 void WebPluginLoadObserver::didFailLoading(const WebURLError& error) |
| 52 { | 67 { |
| 53 if (m_pluginContainer) | 68 if (m_pluginContainer) |
| 54 m_pluginContainer->plugin()->didFailLoadingFrameRequest(m_notifyURL, m_n otifyData, error); | 69 m_pluginContainer->plugin()->didFailLoadingFrameRequest(m_notifyURL, m_n otifyData, error); |
| 55 } | 70 } |
| 56 | 71 |
| 57 } // namespace blink | 72 } // namespace blink |
| OLD | NEW |