Add global lock for Enter* classes. Add ScopedProxyLock for non-thunk proxies. Add multi-threading test for PPB_Var.

BUG=92909
TEST=None yet

Review URL: http://codereview.chromium.org/8016008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104931 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/build/common.gypi b/build/common.gypi
index eb1a36fe..435f7e1 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -221,6 +221,11 @@
       # Webrtc compilation is enabled by default. Set to 0 to disable.
       'enable_webrtc%': 1,
 
+      # PPAPI by default does not support plugins making calls off the main
+      # thread. Set to 1 to turn on experimental support for out-of-process
+      # plugins to make call of the main thread.
+      'enable_pepper_threading%': 0,
+
       # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
       # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
       # the input value also defines the required XI2 minor minimum version.
@@ -345,6 +350,7 @@
     'use_gnome_keyring%': '<(use_gnome_keyring)',
     'linux_fpic%': '<(linux_fpic)',
     'enable_flapper_hacks%': '<(enable_flapper_hacks)',
+    'enable_pepper_threading%': '<(enable_pepper_threading)',
     'chromeos%': '<(chromeos)',
     'touchui%': '<(touchui)',
     'use_virtual_keyboard%': '<(use_virtual_keyboard)',
@@ -975,6 +981,9 @@
       ['enable_flapper_hacks==1', {
         'defines': ['ENABLE_FLAPPER_HACKS=1'],
       }],
+      ['enable_pepper_threading==1', {
+        'defines': ['ENABLE_PEPPER_THREADING'],
+      }],
       ['configuration_policy==1', {
         'defines': ['ENABLE_CONFIGURATION_POLICY'],
       }],