| 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/pepper/pepper_webplugin_impl.h" | 5 #include "content/renderer/pepper/pepper_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/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 scoped_refptr<V8ObjectVar> object_var( | 149 scoped_refptr<V8ObjectVar> object_var( |
| 150 V8ObjectVar::FromPPVar(instance_object_)); | 150 V8ObjectVar::FromPPVar(instance_object_)); |
| 151 // If there's an InstanceObject, tell the Instance's MessageChannel to pass | 151 // If there's an InstanceObject, tell the Instance's MessageChannel to pass |
| 152 // any non-postMessage calls to it. | 152 // any non-postMessage calls to it. |
| 153 if (object_var.get()) { | 153 if (object_var.get()) { |
| 154 MessageChannel* message_channel = instance_->message_channel(); | 154 MessageChannel* message_channel = instance_->message_channel(); |
| 155 if (message_channel) | 155 if (message_channel) |
| 156 message_channel->SetPassthroughObject(object_var->GetHandle()); | 156 message_channel->SetPassthroughObject(object_var->GetHandle()); |
| 157 } | 157 } |
| 158 | 158 |
| 159 v8::Handle<v8::Object> result = instance_->GetMessageChannelObject(); | 159 v8::Local<v8::Object> result = instance_->GetMessageChannelObject(); |
| 160 return result; | 160 return result; |
| 161 } | 161 } |
| 162 | 162 |
| 163 bool PepperWebPluginImpl::getFormValue(WebString& value) { return false; } | 163 bool PepperWebPluginImpl::getFormValue(WebString& value) { return false; } |
| 164 | 164 |
| 165 void PepperWebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) { | 165 void PepperWebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) { |
| 166 if (!instance_->FlashIsFullscreenOrPending()) | 166 if (!instance_->FlashIsFullscreenOrPending()) |
| 167 instance_->Paint(canvas, plugin_rect_, rect); | 167 instance_->Paint(canvas, plugin_rect_, rect); |
| 168 } | 168 } |
| 169 | 169 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 bool PepperWebPluginImpl::canRotateView() { return instance_->CanRotateView(); } | 289 bool PepperWebPluginImpl::canRotateView() { return instance_->CanRotateView(); } |
| 290 | 290 |
| 291 void PepperWebPluginImpl::rotateView(RotationType type) { | 291 void PepperWebPluginImpl::rotateView(RotationType type) { |
| 292 instance_->RotateView(type); | 292 instance_->RotateView(type); |
| 293 } | 293 } |
| 294 | 294 |
| 295 bool PepperWebPluginImpl::isPlaceholder() { return false; } | 295 bool PepperWebPluginImpl::isPlaceholder() { return false; } |
| 296 | 296 |
| 297 } // namespace content | 297 } // namespace content |
| OLD | NEW |