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

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

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More build fixes Created 4 years, 4 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 false, 83 false,
84 FrameLoaderClient::AllowDetachedPlugin)); 84 FrameLoaderClient::AllowDetachedPlugin));
85 85
86 if (!m_pluginContainer) 86 if (!m_pluginContainer)
87 return false; 87 return false;
88 88
89 // Getting a placeholder plugin is also failure, since it's not the plugin t he caller needed. 89 // Getting a placeholder plugin is also failure, since it's not the plugin t he caller needed.
90 return !getPlugin()->isPlaceholder(); 90 return !getPlugin()->isPlaceholder();
91 } 91 }
92 92
93 void WebHelperPluginImpl::reallyDestroy(Timer<WebHelperPluginImpl>*) 93 void WebHelperPluginImpl::reallyDestroy(TimerBase*)
94 { 94 {
95 delete this; 95 delete this;
96 } 96 }
97 97
98 void WebHelperPluginImpl::destroy() 98 void WebHelperPluginImpl::destroy()
99 { 99 {
100 // Defer deletion so we don't do too much work when called via stopActiveDOM Objects(). 100 // Defer deletion so we don't do too much work when called via stopActiveDOM Objects().
101 // FIXME: It's not clear why we still need this. The original code held a Pa ge and a 101 // FIXME: It's not clear why we still need this. The original code held a Pa ge and a
102 // WebFrame, and destroying it would cause JavaScript triggered by frame det ach to run, 102 // WebFrame, and destroying it would cause JavaScript triggered by frame det ach to run,
103 // which isn't allowed inside stopActiveDOMObjects(). Removing this causes o ne Chrome test 103 // which isn't allowed inside stopActiveDOMObjects(). Removing this causes o ne Chrome test
104 // to fail with a timeout. 104 // to fail with a timeout.
105 m_destructionTimer.startOneShot(0, BLINK_FROM_HERE); 105 m_destructionTimer.startOneShot(0, BLINK_FROM_HERE);
106 } 106 }
107 107
108 WebPlugin* WebHelperPluginImpl::getPlugin() 108 WebPlugin* WebHelperPluginImpl::getPlugin()
109 { 109 {
110 DCHECK(m_pluginContainer); 110 DCHECK(m_pluginContainer);
111 DCHECK(m_pluginContainer->plugin()); 111 DCHECK(m_pluginContainer->plugin());
112 return m_pluginContainer->plugin(); 112 return m_pluginContainer->plugin();
113 } 113 }
114 114
115 } // namespace blink 115 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebHelperPluginImpl.h ('k') | third_party/WebKit/Source/web/WebLeakDetector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698