OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/renderer/blocked_plugin.h" | 5 #include "chrome/renderer/blocked_plugin.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 87 } |
88 | 88 |
89 void BlockedPlugin::LoadPlugin() { | 89 void BlockedPlugin::LoadPlugin() { |
90 CHECK(plugin_); | 90 CHECK(plugin_); |
91 WebPluginContainer* container = plugin_->container(); | 91 WebPluginContainer* container = plugin_->container(); |
92 WebPlugin* new_plugin = | 92 WebPlugin* new_plugin = |
93 render_view_->CreatePluginNoCheck(frame_, | 93 render_view_->CreatePluginNoCheck(frame_, |
94 plugin_params_); | 94 plugin_params_); |
95 if (new_plugin && new_plugin->initialize(container)) { | 95 if (new_plugin && new_plugin->initialize(container)) { |
96 container->setPlugin(new_plugin); | 96 container->setPlugin(new_plugin); |
97 plugin_->ReplayReceivedData(new_plugin); | |
98 container->invalidate(); | 97 container->invalidate(); |
99 container->reportGeometry(); | 98 container->reportGeometry(); |
| 99 plugin_->ReplayReceivedData(new_plugin); |
100 plugin_->destroy(); | 100 plugin_->destroy(); |
101 render_view_->Send( | 101 render_view_->Send( |
102 new ViewHostMsg_BlockedPluginLoaded(render_view_->routing_id())); | 102 new ViewHostMsg_BlockedPluginLoaded(render_view_->routing_id())); |
103 } | 103 } |
104 } | 104 } |
OLD | NEW |