OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "webkit/glue/npruntime_util.h" | 7 #include "webkit/glue/npruntime_util.h" |
8 | 8 |
9 // Import the definition of PrivateIdentifier | 9 // Import the definition of PrivateIdentifier |
10 #if USE(V8_BINDING) | 10 #if USE(V8_BINDING) |
11 #include "webkit/port/bindings/v8/np_v8object.h" | 11 #include "webkit/port/bindings/v8/np_v8object.h" |
12 #elif USE(JAVASCRIPTCORE_BINDINGS) | 12 #elif USE(JAVASCRIPTCORE_BINDINGS) |
13 #include "bridge/c/c_utility.h" | 13 #include "bridge/c/c_utility.h" |
14 using KJS::Bindings::PrivateIdentifier; | 14 using JSC::Bindings::PrivateIdentifier; |
15 #endif | 15 #endif |
16 | 16 |
17 #include "base/pickle.h" | 17 #include "base/pickle.h" |
18 | 18 |
19 namespace webkit_glue { | 19 namespace webkit_glue { |
20 | 20 |
21 bool SerializeNPIdentifier(NPIdentifier identifier, Pickle* pickle) { | 21 bool SerializeNPIdentifier(NPIdentifier identifier, Pickle* pickle) { |
22 PrivateIdentifier* priv = static_cast<PrivateIdentifier*>(identifier); | 22 PrivateIdentifier* priv = static_cast<PrivateIdentifier*>(identifier); |
23 | 23 |
24 // If the identifier was null, then we just send a numeric 0. This is to | 24 // If the identifier was null, then we just send a numeric 0. This is to |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 int number; | 58 int number; |
59 if (!pickle.ReadInt(pickle_iter, &number)) | 59 if (!pickle.ReadInt(pickle_iter, &number)) |
60 return false; | 60 return false; |
61 *identifier = NPN_GetIntIdentifier(number); | 61 *identifier = NPN_GetIntIdentifier(number); |
62 } | 62 } |
63 return true; | 63 return true; |
64 } | 64 } |
65 | 65 |
66 } // namespace webkit_glue | 66 } // namespace webkit_glue |
67 | 67 |
OLD | NEW |