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

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

Issue 2389633002: reflow comments in web/ (Closed)
Patch Set: . Created 4 years, 2 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 DCHECK(frame->frame()->document()->url().isValid()); 66 DCHECK(frame->frame()->document()->url().isValid());
67 m_pluginContainer = 67 m_pluginContainer =
68 toWebPluginContainerImpl(frame->frame()->loader().client()->createPlugin( 68 toWebPluginContainerImpl(frame->frame()->loader().client()->createPlugin(
69 m_objectElement.get(), frame->frame()->document()->url(), 69 m_objectElement.get(), frame->frame()->document()->url(),
70 attributeNames, attributeValues, pluginType, false, 70 attributeNames, attributeValues, pluginType, false,
71 FrameLoaderClient::AllowDetachedPlugin)); 71 FrameLoaderClient::AllowDetachedPlugin));
72 72
73 if (!m_pluginContainer) 73 if (!m_pluginContainer)
74 return false; 74 return false;
75 75
76 // Getting a placeholder plugin is also failure, since it's not the plugin the caller needed. 76 // Getting a placeholder plugin is also failure, since it's not the plugin the
77 // caller needed.
77 return !getPlugin()->isPlaceholder(); 78 return !getPlugin()->isPlaceholder();
78 } 79 }
79 80
80 void WebHelperPluginImpl::reallyDestroy(TimerBase*) { 81 void WebHelperPluginImpl::reallyDestroy(TimerBase*) {
81 delete this; 82 delete this;
82 } 83 }
83 84
84 void WebHelperPluginImpl::destroy() { 85 void WebHelperPluginImpl::destroy() {
85 // Defer deletion so we don't do too much work when called via stopActiveDOMOb jects(). 86 // Defer deletion so we don't do too much work when called via
86 // FIXME: It's not clear why we still need this. The original code held a Page and a 87 // stopActiveDOMObjects().
87 // WebFrame, and destroying it would cause JavaScript triggered by frame detac h to run, 88 // FIXME: It's not clear why we still need this. The original code held a
88 // which isn't allowed inside stopActiveDOMObjects(). Removing this causes one Chrome test 89 // Page and a WebFrame, and destroying it would cause JavaScript triggered by
89 // to fail with a timeout. 90 // frame detach to run, which isn't allowed inside stopActiveDOMObjects().
91 // Removing this causes one Chrome test to fail with a timeout.
90 m_destructionTimer.startOneShot(0, BLINK_FROM_HERE); 92 m_destructionTimer.startOneShot(0, BLINK_FROM_HERE);
91 } 93 }
92 94
93 WebPlugin* WebHelperPluginImpl::getPlugin() { 95 WebPlugin* WebHelperPluginImpl::getPlugin() {
94 DCHECK(m_pluginContainer); 96 DCHECK(m_pluginContainer);
95 DCHECK(m_pluginContainer->plugin()); 97 DCHECK(m_pluginContainer->plugin());
96 return m_pluginContainer->plugin(); 98 return m_pluginContainer->plugin();
97 } 99 }
98 100
99 } // namespace blink 101 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebHelperPluginImpl.h ('k') | third_party/WebKit/Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698