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/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
141 // any non-postMessage calls to it. | 141 // any non-postMessage calls to it. |
142 if (object) { | 142 if (object) { |
143 instance_->message_channel().SetPassthroughObject(object->np_object()); | 143 instance_->message_channel().SetPassthroughObject(object->np_object()); |
144 } | 144 } |
145 NPObject* message_channel_np_object(instance_->message_channel().np_object()); | 145 NPObject* message_channel_np_object(instance_->message_channel().np_object()); |
146 // The object is expected to be retained before it is returned. | 146 // The object is expected to be retained before it is returned. |
147 WebKit::WebBindings::retainObject(message_channel_np_object); | 147 WebKit::WebBindings::retainObject(message_channel_np_object); |
148 return message_channel_np_object; | 148 return message_channel_np_object; |
149 } | 149 } |
150 | 150 |
151 NPP WebPluginImpl::pluginNPP() { | |
152 // We must return the same pointer that the NPP parameter to NPObject binding | |
153 // calls will contain. WebKit will treat it as opaque, though, so it needn't | |
jamesr
2013/05/15 22:32:15
if it's opaque anyway, can we fix the type to not
Wez
2013/05/15 23:14:16
There's not really any point in doing that right n
| |
154 // be an actual NPP_t instance. | |
155 return reinterpret_cast<NPP>(this); | |
156 } | |
157 | |
151 bool WebPluginImpl::getFormValue(WebString& value) { | 158 bool WebPluginImpl::getFormValue(WebString& value) { |
152 return false; | 159 return false; |
153 } | 160 } |
154 | 161 |
155 void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) { | 162 void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) { |
156 if (!instance_->FlashIsFullscreenOrPending()) | 163 if (!instance_->FlashIsFullscreenOrPending()) |
157 instance_->Paint(canvas, plugin_rect_, rect); | 164 instance_->Paint(canvas, plugin_rect_, rect); |
158 } | 165 } |
159 | 166 |
160 void WebPluginImpl::updateGeometry( | 167 void WebPluginImpl::updateGeometry( |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
297 void WebPluginImpl::rotateView(RotationType type) { | 304 void WebPluginImpl::rotateView(RotationType type) { |
298 instance_->RotateView(type); | 305 instance_->RotateView(type); |
299 } | 306 } |
300 | 307 |
301 bool WebPluginImpl::isPlaceholder() { | 308 bool WebPluginImpl::isPlaceholder() { |
302 return false; | 309 return false; |
303 } | 310 } |
304 | 311 |
305 } // namespace ppapi | 312 } // namespace ppapi |
306 } // namespace webkit | 313 } // namespace webkit |
OLD | NEW |