| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/npapi/webplugin_impl.h" | 5 #include "content/renderer/npapi/webplugin_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 delegate_ = plugin_delegate; | 136 delegate_ = plugin_delegate; |
| 137 | 137 |
| 138 return true; | 138 return true; |
| 139 } | 139 } |
| 140 | 140 |
| 141 void WebPluginImpl::destroy() { | 141 void WebPluginImpl::destroy() { |
| 142 SetContainer(NULL); | 142 SetContainer(NULL); |
| 143 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 143 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| 144 } | 144 } |
| 145 | 145 |
| 146 bool WebPluginImpl::getFormValue(blink::WebString& value) { | |
| 147 if (!delegate_) | |
| 148 return false; | |
| 149 base::string16 form_value; | |
| 150 if (!delegate_->GetFormValue(&form_value)) | |
| 151 return false; | |
| 152 value = form_value; | |
| 153 return true; | |
| 154 } | |
| 155 | |
| 156 void WebPluginImpl::updateAllLifecyclePhases() { | 146 void WebPluginImpl::updateAllLifecyclePhases() { |
| 157 if (!container_) | 147 if (!container_) |
| 158 return; | 148 return; |
| 159 | 149 |
| 160 #if defined(OS_WIN) | 150 #if defined(OS_WIN) |
| 161 // Force a geometry update if needed to allow plugins like media player | 151 // Force a geometry update if needed to allow plugins like media player |
| 162 // which defer the initial geometry update to work. Do it now, rather | 152 // which defer the initial geometry update to work. Do it now, rather |
| 163 // than in paint, so that the paint rect invalidation is registered. | 153 // than in paint, so that the paint rect invalidation is registered. |
| 164 // Otherwise we may never get the paint call. | 154 // Otherwise we may never get the paint call. |
| 165 container_->reportGeometry(); | 155 container_->reportGeometry(); |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 case PLUGIN_SRC: | 629 case PLUGIN_SRC: |
| 640 webframe_->setReferrerForRequest(*request, plugin_url_); | 630 webframe_->setReferrerForRequest(*request, plugin_url_); |
| 641 break; | 631 break; |
| 642 | 632 |
| 643 default: | 633 default: |
| 644 break; | 634 break; |
| 645 } | 635 } |
| 646 } | 636 } |
| 647 | 637 |
| 648 } // namespace content | 638 } // namespace content |
| OLD | NEW |