diff options
author | wangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-09 20:26:15 +0000 |
---|---|---|
committer | wangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-09 20:26:15 +0000 |
commit | 3338bcfceb61b73b46914eae305cec86cea8484e (patch) | |
tree | 496d70543570b42d5c36b77b0c5156597e6701c0 /webkit/glue | |
parent | d86fbbebdddc19e02311a27c8e44ec4119458cd2 (diff) | |
download | chromium_src-3338bcfceb61b73b46914eae305cec86cea8484e.zip chromium_src-3338bcfceb61b73b46914eae305cec86cea8484e.tar.gz chromium_src-3338bcfceb61b73b46914eae305cec86cea8484e.tar.bz2 |
Quote CppBoundClass/CppVariant in namespace.
To avoid name conflict when linking DumpRenderTree which has its own implementation of the classes with the same names.
Eventually the related classes will be replaced with V8 API.
BUG=127238
TEST=Build all without error
TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10382059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/cpp_binding_example.cc | 6 | ||||
-rw-r--r-- | webkit/glue/cpp_binding_example.h | 6 | ||||
-rw-r--r-- | webkit/glue/cpp_bound_class.cc | 6 | ||||
-rw-r--r-- | webkit/glue/cpp_bound_class.h | 6 | ||||
-rw-r--r-- | webkit/glue/cpp_bound_class_unittest.cc | 5 | ||||
-rw-r--r-- | webkit/glue/cpp_variant.cc | 6 | ||||
-rw-r--r-- | webkit/glue/cpp_variant.h | 6 | ||||
-rw-r--r-- | webkit/glue/cpp_variant_unittest.cc | 3 |
8 files changed, 36 insertions, 8 deletions
diff --git a/webkit/glue/cpp_binding_example.cc b/webkit/glue/cpp_binding_example.cc index 678151a..7db5c5f 100644 --- a/webkit/glue/cpp_binding_example.cc +++ b/webkit/glue/cpp_binding_example.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -10,6 +10,8 @@ #include "base/bind.h" #include "base/bind_helpers.h" +namespace webkit_glue { + namespace { class PropertyCallbackExample : public CppBoundClass::PropertyCallback { @@ -129,3 +131,5 @@ void CppBindingExample::fallbackMethod(const CppArgumentList& args, CppVariant* result) { printf("Error: unknown JavaScript method invoked.\n"); } + +} // namespace webkit_glue diff --git a/webkit/glue/cpp_binding_example.h b/webkit/glue/cpp_binding_example.h index f092224..5be4820 100644 --- a/webkit/glue/cpp_binding_example.h +++ b/webkit/glue/cpp_binding_example.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -36,6 +36,8 @@ #include "webkit/glue/cpp_bound_class.h" #include "webkit/glue/webkit_glue_export.h" +namespace webkit_glue { + class CppBindingExample : public CppBoundClass { public: // The default constructor initializes the property and method lists needed @@ -76,4 +78,6 @@ class CppBindingExample : public CppBoundClass { CppVariant my_other_value; }; +} // namespace webkit_glue + #endif // CPP_BINDING_EXAMPLE_H__ diff --git a/webkit/glue/cpp_bound_class.cc b/webkit/glue/cpp_bound_class.cc index ff1f8ab..75f91fb 100644 --- a/webkit/glue/cpp_bound_class.cc +++ b/webkit/glue/cpp_bound_class.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -24,6 +24,8 @@ using WebKit::WebBindings; using WebKit::WebFrame; +namespace webkit_glue { + namespace { class CppVariantPropertyCallback : public CppBoundClass::PropertyCallback { @@ -324,3 +326,5 @@ void CppBoundClass::BindToJavascript(WebFrame* frame, NPVARIANT_TO_OBJECT(*GetAsCppVariant())); bound_to_frame_ = true; } + +} // namespace webkit_glue diff --git a/webkit/glue/cpp_bound_class.h b/webkit/glue/cpp_bound_class.h index 61ccc31..a321e46 100644 --- a/webkit/glue/cpp_bound_class.h +++ b/webkit/glue/cpp_bound_class.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -31,6 +31,8 @@ namespace WebKit { class WebFrame; } +namespace webkit_glue { + typedef std::vector<CppVariant> CppArgumentList; // CppBoundClass lets you map Javascript method calls and property accesses @@ -140,4 +142,6 @@ class WEBKIT_GLUE_EXPORT CppBoundClass { DISALLOW_COPY_AND_ASSIGN(CppBoundClass); }; +} // namespace webkit_glue + #endif // CPP_BOUNDCLASS_H__ diff --git a/webkit/glue/cpp_bound_class_unittest.cc b/webkit/glue/cpp_bound_class_unittest.cc index 2bf679a..29c3193 100644 --- a/webkit/glue/cpp_bound_class_unittest.cc +++ b/webkit/glue/cpp_bound_class_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -21,6 +21,9 @@ #include "webkit/tools/test_shell/test_shell_test.h" using WebKit::WebFrame; +using webkit_glue::CppArgumentList; +using webkit_glue::CppBindingExample; +using webkit_glue::CppVariant; namespace { diff --git a/webkit/glue/cpp_variant.cc b/webkit/glue/cpp_variant.cc index 699f7f1..4889774 100644 --- a/webkit/glue/cpp_variant.cc +++ b/webkit/glue/cpp_variant.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -14,6 +14,8 @@ using WebKit::WebBindings; +namespace webkit_glue { + CppVariant::CppVariant() { type = NPVariantType_Null; } @@ -261,3 +263,5 @@ bool CppVariant::Invoke(const std::string& method, const CppVariant* args, return false; } } + +} // namespace webkit_glue diff --git a/webkit/glue/cpp_variant.h b/webkit/glue/cpp_variant.h index 25cbe6f..8c13048 100644 --- a/webkit/glue/cpp_variant.h +++ b/webkit/glue/cpp_variant.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -25,6 +25,8 @@ #include "third_party/npapi/bindings/npruntime.h" #include "webkit/glue/webkit_glue_export.h" +namespace webkit_glue { + class WEBKIT_GLUE_EXPORT CppVariant : public NPVariant { public: CppVariant(); @@ -109,4 +111,6 @@ class WEBKIT_GLUE_EXPORT CppVariant : public NPVariant { uint32 arg_count, CppVariant& result) const; }; +} // namespace webkit_glue + #endif // WEBKIT_GLUE_CPP_VARIANT_H__ diff --git a/webkit/glue/cpp_variant_unittest.cc b/webkit/glue/cpp_variant_unittest.cc index f3c6b61..85cc140 100644 --- a/webkit/glue/cpp_variant_unittest.cc +++ b/webkit/glue/cpp_variant_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -11,6 +11,7 @@ #include "webkit/glue/cpp_variant.h" using WebKit::WebBindings; +using webkit_glue::CppVariant; // Creates a std::string from an NPVariant of string type. If the NPVariant // is not a string, empties the std::string. |