| 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/message_channel.h" | 5 #include "content/renderer/pepper/message_channel.h" |
| 6 | 6 |
| 7 #include <cstdlib> | 7 #include <cstdlib> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "third_party/WebKit/public/web/WebElement.h" | 25 #include "third_party/WebKit/public/web/WebElement.h" |
| 26 #include "third_party/WebKit/public/web/WebFrame.h" | 26 #include "third_party/WebKit/public/web/WebFrame.h" |
| 27 #include "third_party/WebKit/public/web/WebNode.h" | 27 #include "third_party/WebKit/public/web/WebNode.h" |
| 28 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 28 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
| 29 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" | 29 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" |
| 30 #include "v8/include/v8.h" | 30 #include "v8/include/v8.h" |
| 31 | 31 |
| 32 using ppapi::ArrayBufferVar; | 32 using ppapi::ArrayBufferVar; |
| 33 using ppapi::PpapiGlobals; | 33 using ppapi::PpapiGlobals; |
| 34 using ppapi::StringVar; | 34 using ppapi::StringVar; |
| 35 using WebKit::WebBindings; | 35 using blink::WebBindings; |
| 36 using WebKit::WebElement; | 36 using blink::WebElement; |
| 37 using WebKit::WebDOMEvent; | 37 using blink::WebDOMEvent; |
| 38 using WebKit::WebDOMMessageEvent; | 38 using blink::WebDOMMessageEvent; |
| 39 using WebKit::WebPluginContainer; | 39 using blink::WebPluginContainer; |
| 40 using WebKit::WebSerializedScriptValue; | 40 using blink::WebSerializedScriptValue; |
| 41 | 41 |
| 42 namespace content { | 42 namespace content { |
| 43 | 43 |
| 44 namespace { | 44 namespace { |
| 45 | 45 |
| 46 const char kPostMessage[] = "postMessage"; | 46 const char kPostMessage[] = "postMessage"; |
| 47 const char kV8ToVarConversionError[] = "Failed to convert a PostMessage " | 47 const char kV8ToVarConversionError[] = "Failed to convert a PostMessage " |
| 48 "argument from a JavaScript value to a PP_Var. It may have cycles or be of " | 48 "argument from a JavaScript value to a PP_Var. It may have cycles or be of " |
| 49 "an unsupported type."; | 49 "an unsupported type."; |
| 50 const char kVarToV8ConversionError[] = "Failed to convert a PostMessage " | 50 const char kVarToV8ConversionError[] = "Failed to convert a PostMessage " |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 // incoming passthrough object first, so that we behave correctly if anyone | 552 // incoming passthrough object first, so that we behave correctly if anyone |
| 553 // invokes: | 553 // invokes: |
| 554 // SetPassthroughObject(passthrough_object()); | 554 // SetPassthroughObject(passthrough_object()); |
| 555 if (passthrough_object_) | 555 if (passthrough_object_) |
| 556 WebBindings::releaseObject(passthrough_object_); | 556 WebBindings::releaseObject(passthrough_object_); |
| 557 | 557 |
| 558 passthrough_object_ = passthrough; | 558 passthrough_object_ = passthrough; |
| 559 } | 559 } |
| 560 | 560 |
| 561 } // namespace content | 561 } // namespace content |
| OLD | NEW |