Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Side by Side Diff: webkit/port/bindings/v8/NPV8Object.h

Issue 155163: Downstream the partially upstreamed NPV8 files with fixes for errors introduced in upstreaming. (Closed)
Patch Set: hi Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webkit/port/bindings/v8/NPV8Object.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 /*
2 // Use of this source code is governed by a BSD-style license that can be 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved.
3 // found in the LICENSE file. 3 *
4 4 * Redistribution and use in source and binary forms, with or without
5 #ifndef np_v8object_h 5 * modification, are permitted provided that the following conditions are
6 #define np_v8object_h 6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30 #ifndef NPV8Object_h
31 #define NPV8Object_h
7 32
8 #include "bindings/npruntime.h" 33 #include "bindings/npruntime.h"
9 #include <v8.h> 34 #include <v8.h>
10 35
11 namespace WebCore { 36 namespace WebCore {
12 class DOMWindow; 37 class DOMWindow;
13 } 38 }
14 39
15 extern NPClass* npScriptObjectClass; 40 extern NPClass* npScriptObjectClass;
16 41
17 // A V8NPObject is a NPObject which carries additional V8-specific 42 // A V8NPObject is a NPObject which carries additional V8-specific information. It is allocated and deallocated by
18 // information. It is allocated and deallocated by AllocV8NPObject() 43 // AllocV8NPObject() and FreeV8NPObject() methods.
19 // and FreeV8NPObject() methods.
20 struct V8NPObject { 44 struct V8NPObject {
21 NPObject object; 45 NPObject object;
22 v8::Persistent<v8::Object> v8Object; 46 v8::Persistent<v8::Object> v8Object;
23 WebCore::DOMWindow* rootObject; 47 WebCore::DOMWindow* rootObject;
24 }; 48 };
25 49
26 struct PrivateIdentifier { 50 struct PrivateIdentifier {
27 union { 51 union {
28 const NPUTF8* string; 52 const NPUTF8* string;
29 int32_t number; 53 int32_t number;
30 } value; 54 } value;
31 bool isString; 55 bool isString;
32 }; 56 };
33 57
34 NPObject* npCreateV8ScriptObject(NPP npp, v8::Handle<v8::Object>, WebCore::DOMWi ndow*); 58 NPObject* npCreateV8ScriptObject(NPP, v8::Handle<v8::Object>, WebCore::DOMWindow *);
35 59
36 #endif // np_v8object_h 60 #endif // NPV8Object_h
OLDNEW
« no previous file with comments | « no previous file | webkit/port/bindings/v8/NPV8Object.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698