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 | |
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
21 files changed, 190 insertions, 91 deletions
diff --git a/chrome/renderer/external_host_bindings.cc b/chrome/renderer/external_host_bindings.cc index 33ac0bb..479e175 100644 --- a/chrome/renderer/external_host_bindings.cc +++ b/chrome/renderer/external_host_bindings.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. @@ -13,6 +13,8 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" using WebKit::WebBindings; +using webkit_glue::CppArgumentList; +using webkit_glue::CppVariant; ExternalHostBindings::ExternalHostBindings(IPC::Message::Sender* sender, int routing_id) diff --git a/chrome/renderer/external_host_bindings.h b/chrome/renderer/external_host_bindings.h index 9df67bd..6f98925 100644 --- a/chrome/renderer/external_host_bindings.h +++ b/chrome/renderer/external_host_bindings.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. @@ -14,7 +14,7 @@ // // We expose one function, for sending a message to the external host: // postMessage(String message[, String target]); -class ExternalHostBindings : public CppBoundClass { +class ExternalHostBindings : public webkit_glue::CppBoundClass { public: ExternalHostBindings(IPC::Message::Sender* sender, int routing_id); virtual ~ExternalHostBindings(); @@ -35,9 +35,10 @@ class ExternalHostBindings : public CppBoundClass { bool CreateMessageEvent(NPObject** message_event); // The postMessage() function provided to Javascript. - void PostMessage(const CppArgumentList& args, CppVariant* result); + void PostMessage(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); - CppVariant on_message_handler_; + webkit_glue::CppVariant on_message_handler_; WebKit::WebFrame* frame_; IPC::Message::Sender* sender_; int routing_id_; diff --git a/chrome/renderer/plugins/plugin_placeholder.cc b/chrome/renderer/plugins/plugin_placeholder.cc index 885472d..842dc28 100644 --- a/chrome/renderer/plugins/plugin_placeholder.cc +++ b/chrome/renderer/plugins/plugin_placeholder.cc @@ -63,6 +63,8 @@ using WebKit::WebString; using WebKit::WebURLRequest; using WebKit::WebVector; using webkit::WebViewPlugin; +using webkit_glue::CppArgumentList; +using webkit_glue::CppVariant; const char* const kPluginPlaceholderDataURL = "chrome://pluginplaceholderdata/"; diff --git a/chrome/renderer/plugins/plugin_placeholder.h b/chrome/renderer/plugins/plugin_placeholder.h index 5eb4b2a..561cd16 100644 --- a/chrome/renderer/plugins/plugin_placeholder.h +++ b/chrome/renderer/plugins/plugin_placeholder.h @@ -26,7 +26,7 @@ struct WebPluginInfo; // (blocked or disabled). class PluginPlaceholder : public content::RenderViewObserver, public content::RenderProcessObserver, - public CppBoundClass, + public webkit_glue::CppBoundClass, public webkit::WebViewPlugin::Delegate { public: // Creates a new WebViewPlugin with a MissingPlugin as a delegate. @@ -115,19 +115,21 @@ class PluginPlaceholder : public content::RenderViewObserver, // Javascript callbacks: // Load the blocked plugin by calling LoadPlugin(). // Takes no arguments, and returns nothing. - void LoadCallback(const CppArgumentList& args, CppVariant* result); + void LoadCallback(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); // Hide the blocked plugin by calling HidePlugin(). // Takes no arguments, and returns nothing. - void HideCallback(const CppArgumentList& args, CppVariant* result); + void HideCallback(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); // Opens chrome://plugins in a new tab. // Takes no arguments, and returns nothing. - void OpenAboutPluginsCallback(const CppArgumentList& args, - CppVariant* result); + void OpenAboutPluginsCallback(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); - void DidFinishLoadingCallback(const CppArgumentList& args, - CppVariant* result); + void DidFinishLoadingCallback(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void OnLoadBlockedPlugins(); void OnSetIsPrerendering(bool is_prerendering); diff --git a/content/renderer/dom_automation_controller.cc b/content/renderer/dom_automation_controller.cc index 85e2fcd..4c2a717 100644 --- a/content/renderer/dom_automation_controller.cc +++ b/content/renderer/dom_automation_controller.cc @@ -10,6 +10,9 @@ #include "base/string_util.h" #include "content/common/view_messages.h" +using webkit_glue::CppArgumentList; +using webkit_glue::CppVariant; + DomAutomationController::DomAutomationController() : sender_(NULL), routing_id_(MSG_ROUTING_NONE), diff --git a/content/renderer/dom_automation_controller.h b/content/renderer/dom_automation_controller.h index 9dabb79..2049408 100644 --- a/content/renderer/dom_automation_controller.h +++ b/content/renderer/dom_automation_controller.h @@ -74,7 +74,7 @@ // TODO(vibhor): Add another method-pair like sendLater() and sendNow() // sendLater() should keep building a json serializer // sendNow() should send the above serializer as a string. -class DomAutomationController : public CppBoundClass { +class DomAutomationController : public webkit_glue::CppBoundClass { public: DomAutomationController(); @@ -83,12 +83,14 @@ class DomAutomationController : public CppBoundClass { // Number (double casted to int32) or boolean. // The function returns true/false based on the result of actual send over // IPC. It sets the return value to null on unexpected errors or arguments. - void Send(const CppArgumentList& args, CppVariant* result); + void Send(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); // Makes the renderer send a javascript value to the app. // The value must be a NPString and should be properly formed JSON. // This function does not modify/escape the returned string in any way. - void SendJSON(const CppArgumentList& args, CppVariant* result); + void SendJSON(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); // Sends a string with a provided Automation Id. // Expects two javascript values; the first must be a number type and will be @@ -96,9 +98,11 @@ class DomAutomationController : public CppBoundClass { // The function returns true/false to the javascript based on the success // of the send over IPC. It sets the javascript return value to null on // unexpected errors or arguments. - void SendWithId(const CppArgumentList& args, CppVariant* result); + void SendWithId(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); - void SetAutomationId(const CppArgumentList& args, CppVariant* result); + void SetAutomationId(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); // TODO(vibhor): Implement later // static CppBindingObjectMethod sendLater; diff --git a/content/renderer/web_intents_host.cc b/content/renderer/web_intents_host.cc index a91eae7..b4338f0 100644 --- a/content/renderer/web_intents_host.cc +++ b/content/renderer/web_intents_host.cc @@ -27,6 +27,9 @@ using WebKit::WebFrame; using WebKit::WebIntentRequest; using WebKit::WebString; using WebKit::WebSerializedScriptValue; +using webkit_glue::CppArgumentList; +using webkit_glue::CppBoundClass; +using webkit_glue::CppVariant; // This class encapsulates the API the Intent object will expose to Javascript. // It is made available to the Javascript runtime in the service page using diff --git a/content/renderer/web_ui_bindings.cc b/content/renderer/web_ui_bindings.cc index 7db8b8b3..ffb0023 100644 --- a/content/renderer/web_ui_bindings.cc +++ b/content/renderer/web_ui_bindings.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,9 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" +using webkit_glue::CppArgumentList; +using webkit_glue::CppVariant; + namespace { // Creates a Value which is a copy of the CppVariant |value|. All objects are diff --git a/content/renderer/web_ui_bindings.h b/content/renderer/web_ui_bindings.h index 5d83432..732eeed 100644 --- a/content/renderer/web_ui_bindings.h +++ b/content/renderer/web_ui_bindings.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. @@ -13,7 +13,7 @@ // A DOMBoundBrowserObject is a backing for some object bound to the window // in JS that knows how to dispatch messages to an associated c++ object living // in the browser process. -class DOMBoundBrowserObject : public CppBoundClass { +class DOMBoundBrowserObject : public webkit_glue::CppBoundClass { public: CONTENT_EXPORT DOMBoundBrowserObject(); CONTENT_EXPORT virtual ~DOMBoundBrowserObject(); @@ -24,7 +24,7 @@ class DOMBoundBrowserObject : public CppBoundClass { private: // The list of properties that have been set. We keep track of this so we // can free them on destruction. - typedef std::vector<CppVariant*> PropertyList; + typedef std::vector<webkit_glue::CppVariant*> PropertyList; PropertyList properties_; DISALLOW_COPY_AND_ASSIGN(DOMBoundBrowserObject); @@ -45,7 +45,8 @@ class WebUIBindings : public DOMBoundBrowserObject { private: // The send() function provided to Javascript. - void Send(const CppArgumentList& args, CppVariant* result); + void Send(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); IPC::Message::Sender* sender_; int routing_id_; 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. diff --git a/webkit/tools/test_shell/accessibility_ui_element.cc b/webkit/tools/test_shell/accessibility_ui_element.cc index cd8bc0be..c8756f3 100644 --- a/webkit/tools/test_shell/accessibility_ui_element.cc +++ b/webkit/tools/test_shell/accessibility_ui_element.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::WebCString; using WebKit::WebString; using WebKit::WebAccessibilityObject; using WebKit::WebAccessibilityRole; +using webkit_glue::CppArgumentList; +using webkit_glue::CppVariant; namespace { diff --git a/webkit/tools/test_shell/accessibility_ui_element.h b/webkit/tools/test_shell/accessibility_ui_element.h index 630464d..d930177 100644 --- a/webkit/tools/test_shell/accessibility_ui_element.h +++ b/webkit/tools/test_shell/accessibility_ui_element.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. @@ -8,7 +8,7 @@ #include "webkit/glue/cpp_bound_class.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObject.h" -class AccessibilityUIElement : public CppBoundClass { +class AccessibilityUIElement : public webkit_glue::CppBoundClass { public: class Factory { public: @@ -33,74 +33,117 @@ class AccessibilityUIElement : public CppBoundClass { private: // Bound methods and properties. - void AllAttributesCallback(const CppArgumentList& args, CppVariant* result); + void AllAttributesCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void AttributesOfLinkedUIElementsCallback( - const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void AttributesOfDocumentLinksCallback( - const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void AttributesOfChildrenCallback( - const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void ParametrizedAttributeNamesCallback( - const CppArgumentList& args, CppVariant* result); - void LineForIndexCallback(const CppArgumentList& args, CppVariant* result); - void BoundsForRangeCallback(const CppArgumentList& args, CppVariant* result); - void StringForRangeCallback(const CppArgumentList& args, CppVariant* result); - void ChildAtIndexCallback(const CppArgumentList& args, CppVariant* result); - void ElementAtPointCallback(const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void LineForIndexCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void BoundsForRangeCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void StringForRangeCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void ChildAtIndexCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void ElementAtPointCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void AttributesOfColumnHeadersCallback( - const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void AttributesOfRowHeadersCallback( - const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void AttributesOfColumnsCallback( - const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void AttributesOfRowsCallback( - const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void AttributesOfVisibleCellsCallback( - const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void AttributesOfHeaderCallback( - const CppArgumentList& args, CppVariant* result); - void IndexInTableCallback(const CppArgumentList& args, CppVariant* result); - void RowIndexRangeCallback(const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void IndexInTableCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void RowIndexRangeCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void ColumnIndexRangeCallback( - const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void CellForColumnAndRowCallback( - const CppArgumentList& args, CppVariant* result); - void TitleUIElementCallback(const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void TitleUIElementCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void SetSelectedTextRangeCallback( - const CppArgumentList& args, CppVariant* result); - void AttributeValueCallback(const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void AttributeValueCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void IsAttributeSettableCallback( - const CppArgumentList& args, CppVariant* result); + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); void IsActionSupportedCallback( - const CppArgumentList& args, CppVariant* result); - void ParentElementCallback(const CppArgumentList& args, CppVariant* result); - void IncrementCallback(const CppArgumentList& args, CppVariant* result); - void DecrementCallback(const CppArgumentList& args, CppVariant* result); - void FallbackCallback(const CppArgumentList& args, CppVariant* result); - - void ChildrenCountGetterCallback(CppVariant* result); - void DescriptionGetterCallback(CppVariant* result); - void IsEnabledGetterCallback(CppVariant* result); - void IsSelectedGetterCallback(CppVariant* result); - void RoleGetterCallback(CppVariant* result); - void TitleGetterCallback(CppVariant* result); - - CppVariant subrole_; - CppVariant language_; - CppVariant x_; - CppVariant y_; - CppVariant width_; - CppVariant height_; - CppVariant click_point_x_; - CppVariant click_point_y_; - CppVariant int_value_; - CppVariant min_value_; - CppVariant max_value_; - CppVariant children_count_; - CppVariant insertion_point_line_number_; - CppVariant selected_text_range; - CppVariant is_required_; - CppVariant value_description_; + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void ParentElementCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void IncrementCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void DecrementCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void FallbackCallback( + const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + + void ChildrenCountGetterCallback(webkit_glue::CppVariant* result); + void DescriptionGetterCallback(webkit_glue::CppVariant* result); + void IsEnabledGetterCallback(webkit_glue::CppVariant* result); + void IsSelectedGetterCallback(webkit_glue::CppVariant* result); + void RoleGetterCallback(webkit_glue::CppVariant* result); + void TitleGetterCallback(webkit_glue::CppVariant* result); + + webkit_glue::CppVariant subrole_; + webkit_glue::CppVariant language_; + webkit_glue::CppVariant x_; + webkit_glue::CppVariant y_; + webkit_glue::CppVariant width_; + webkit_glue::CppVariant height_; + webkit_glue::CppVariant click_point_x_; + webkit_glue::CppVariant click_point_y_; + webkit_glue::CppVariant int_value_; + webkit_glue::CppVariant min_value_; + webkit_glue::CppVariant max_value_; + webkit_glue::CppVariant children_count_; + webkit_glue::CppVariant insertion_point_line_number_; + webkit_glue::CppVariant selected_text_range; + webkit_glue::CppVariant is_required_; + webkit_glue::CppVariant value_description_; WebKit::WebAccessibilityObject accessibility_object_; Factory* factory_; diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc index aadbd39..13be875 100644 --- a/webkit/tools/test_shell/layout_test_controller.cc +++ b/webkit/tools/test_shell/layout_test_controller.cc @@ -57,6 +57,8 @@ using WebKit::WebSecurityPolicy; using WebKit::WebSize; using WebKit::WebString; using WebKit::WebURL; +using webkit_glue::CppArgumentList; +using webkit_glue::CppVariant; TestShell* LayoutTestController::shell_ = NULL; // Most of these flags need to be cleared in Reset() so that they get turned diff --git a/webkit/tools/test_shell/layout_test_controller.h b/webkit/tools/test_shell/layout_test_controller.h index 5e82b01..69490b2 100644 --- a/webkit/tools/test_shell/layout_test_controller.h +++ b/webkit/tools/test_shell/layout_test_controller.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 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. @@ -23,7 +23,7 @@ class TestShell; -class LayoutTestController : public CppBoundClass { +class LayoutTestController : public webkit_glue::CppBoundClass { public: // Builds the property and method lists needed to bind this class to a JS // object. @@ -32,15 +32,18 @@ class LayoutTestController : public CppBoundClass { // By default, tests end when page load is complete. These methods are used // to delay the completion of the test until notifyDone is called. - void waitUntilDone(const CppArgumentList& args, CppVariant* result); - void notifyDone(const CppArgumentList& args, CppVariant* result); + void waitUntilDone(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); + void notifyDone(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); // The fallback method is called when a nonexistent method is called on // the layout test controller object. // It is usefull to catch typos in the JavaScript code (a few layout tests // do have typos in them) and it allows the script to continue running in // that case (as the Mac does). - void fallbackMethod(const CppArgumentList& args, CppVariant* result); + void fallbackMethod(const webkit_glue::CppArgumentList& args, + webkit_glue::CppVariant* result); public: // The following methods are not exposed to JavaScript. |