Chromium Code Reviews| 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 "webkit/plugins/ppapi/ppapi_webplugin_impl.h" | 5 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 init_data_->module->path()); | 101 init_data_->module->path()); |
| 102 if (!replacement_plugin || !replacement_plugin->initialize(container)) | 102 if (!replacement_plugin || !replacement_plugin->initialize(container)) |
| 103 return false; | 103 return false; |
| 104 | 104 |
| 105 container->setPlugin(replacement_plugin); | 105 container->setPlugin(replacement_plugin); |
| 106 return true; | 106 return true; |
| 107 } | 107 } |
| 108 | 108 |
| 109 init_data_.reset(); | 109 init_data_.reset(); |
| 110 container_ = container; | 110 container_ = container; |
| 111 container_->setAcceptingTouchEvents(instance_->IsAcceptingTouchEvents()); | |
|
brettw
2012/06/22 18:03:54
Should the instance do this in Initialize() instea
sadrul
2012/06/22 21:37:09
Good point. Done.
| |
| 111 return true; | 112 return true; |
| 112 } | 113 } |
| 113 | 114 |
| 114 void WebPluginImpl::destroy() { | 115 void WebPluginImpl::destroy() { |
| 115 if (instance_) { | 116 if (instance_) { |
| 116 ::ppapi::PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(instance_object_); | 117 ::ppapi::PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(instance_object_); |
| 117 instance_object_ = PP_MakeUndefined(); | 118 instance_object_ = PP_MakeUndefined(); |
| 118 instance_->Delete(); | 119 instance_->Delete(); |
| 119 instance_ = NULL; | 120 instance_ = NULL; |
| 120 } | 121 } |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 289 void WebPluginImpl::rotateView(RotationType type) { | 290 void WebPluginImpl::rotateView(RotationType type) { |
| 290 instance_->RotateView(type); | 291 instance_->RotateView(type); |
| 291 } | 292 } |
| 292 | 293 |
| 293 bool WebPluginImpl::isPlaceholder() { | 294 bool WebPluginImpl::isPlaceholder() { |
| 294 return false; | 295 return false; |
| 295 } | 296 } |
| 296 | 297 |
| 297 } // namespace ppapi | 298 } // namespace ppapi |
| 298 } // namespace webkit | 299 } // namespace webkit |
| OLD | NEW |