Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/plugins/renderer/webview_plugin.h" | 5 #include "components/plugins/renderer/webview_plugin.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/safe_numerics.h" | 9 #include "base/safe_numerics.h" |
| 10 #include "content/public/renderer/web_preferences.h" | 10 #include "content/public/renderer/web_preferences.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 WebPluginContainer* WebViewPlugin::container() const { return container_; } | 94 WebPluginContainer* WebViewPlugin::container() const { return container_; } |
| 95 | 95 |
| 96 bool WebViewPlugin::initialize(WebPluginContainer* container) { | 96 bool WebViewPlugin::initialize(WebPluginContainer* container) { |
| 97 container_ = container; | 97 container_ = container; |
| 98 if (container_) | 98 if (container_) |
| 99 old_title_ = container_->element().getAttribute("title"); | 99 old_title_ = container_->element().getAttribute("title"); |
| 100 return true; | 100 return true; |
| 101 } | 101 } |
| 102 | 102 |
| 103 void WebViewPlugin::destroy() { | 103 void WebViewPlugin::destroy() { |
| 104 if (delegate_) { | 104 if (delegate_) |
| 105 delegate_->WillDestroyPlugin(); | |
|
Bernhard Bauer
2013/12/18 15:31:04
How does the delegate get destroyed now?
| |
| 106 delegate_ = NULL; | 105 delegate_ = NULL; |
| 107 } | |
| 108 container_ = NULL; | 106 container_ = NULL; |
| 109 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 107 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| 110 } | 108 } |
| 111 | 109 |
| 112 NPObject* WebViewPlugin::scriptableObject() { return NULL; } | 110 NPObject* WebViewPlugin::scriptableObject() { return NULL; } |
| 113 | 111 |
| 114 struct _NPP* WebViewPlugin::pluginNPP() { return NULL; } | 112 struct _NPP* WebViewPlugin::pluginNPP() { return NULL; } |
| 115 | 113 |
| 116 bool WebViewPlugin::getFormValue(WebString& value) { return false; } | 114 bool WebViewPlugin::getFormValue(WebString& value) { return false; } |
| 117 | 115 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 void WebViewPlugin::didClearWindowObject(WebFrame* frame) { | 214 void WebViewPlugin::didClearWindowObject(WebFrame* frame) { |
| 217 if (delegate_) | 215 if (delegate_) |
| 218 delegate_->BindWebFrame(frame); | 216 delegate_->BindWebFrame(frame); |
| 219 } | 217 } |
| 220 | 218 |
| 221 void WebViewPlugin::didReceiveResponse(WebFrame* frame, | 219 void WebViewPlugin::didReceiveResponse(WebFrame* frame, |
| 222 unsigned identifier, | 220 unsigned identifier, |
| 223 const WebURLResponse& response) { | 221 const WebURLResponse& response) { |
| 224 WebFrameClient::didReceiveResponse(frame, identifier, response); | 222 WebFrameClient::didReceiveResponse(frame, identifier, response); |
| 225 } | 223 } |
| OLD | NEW |