Switch to standard integer types in ppapi/.

BUG=138542
[email protected]
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1548813002

Cr-Commit-Position: refs/heads/master@{#366718}
diff --git a/ppapi/proxy/audio_buffer_resource.h b/ppapi/proxy/audio_buffer_resource.h
index 8f1e22f..e447917 100644
--- a/ppapi/proxy/audio_buffer_resource.h
+++ b/ppapi/proxy/audio_buffer_resource.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PROXY_AUDIO_BUFFER_RESOURCE_H_
 #define PPAPI_PROXY_AUDIO_BUFFER_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/shared_impl/resource.h"
 #include "ppapi/thunk/ppb_audio_buffer_api.h"
diff --git a/ppapi/proxy/audio_encoder_resource.h b/ppapi/proxy/audio_encoder_resource.h
index ff13aae..f1ba9f3 100644
--- a/ppapi/proxy/audio_encoder_resource.h
+++ b/ppapi/proxy/audio_encoder_resource.h
@@ -5,7 +5,9 @@
 #ifndef PPAPI_PROXY_AUDIO_ENCODER_RESOURCE_H_
 #define PPAPI_PROXY_AUDIO_ENCODER_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
diff --git a/ppapi/proxy/audio_input_resource.cc b/ppapi/proxy/audio_input_resource.cc
index f17dd0a..7d25a71 100644
--- a/ppapi/proxy/audio_input_resource.cc
+++ b/ppapi/proxy/audio_input_resource.cc
@@ -255,7 +255,7 @@
 
   // This is a constantly increasing counter that is used to verify on the
   // browser side that buffers are in sync.
-  uint32 buffer_index = 0;
+  uint32_t buffer_index = 0;
 
   while (true) {
     int pending_data = 0;
diff --git a/ppapi/proxy/audio_input_resource.h b/ppapi/proxy/audio_input_resource.h
index a94ff9c..3a3b40b7 100644
--- a/ppapi/proxy/audio_input_resource.h
+++ b/ppapi/proxy/audio_input_resource.h
@@ -5,8 +5,11 @@
 #ifndef PPAPI_PROXY_AUDIO_INPUT_RESOURCE_H_
 #define PPAPI_PROXY_AUDIO_INPUT_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
diff --git a/ppapi/proxy/broker_dispatcher.h b/ppapi/proxy/broker_dispatcher.h
index 828dac6..5b3d586 100644
--- a/ppapi/proxy/broker_dispatcher.h
+++ b/ppapi/proxy/broker_dispatcher.h
@@ -5,7 +5,10 @@
 #ifndef PPAPI_PROXY_BROKER_DISPATCHER_H_
 #define PPAPI_PROXY_BROKER_DISPATCHER_H_
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/c/trusted/ppp_broker.h"
 #include "ppapi/proxy/proxy_channel.h"
 
diff --git a/ppapi/proxy/broker_resource.cc b/ppapi/proxy/broker_resource.cc
index 4fac07e..18273cd 100644
--- a/ppapi/proxy/broker_resource.cc
+++ b/ppapi/proxy/broker_resource.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/broker_resource.h"
 
+#include <stdint.h>
+
 #include "ppapi/c/pp_bool.h"
 #include "ppapi/proxy/ppapi_messages.h"
 
diff --git a/ppapi/proxy/broker_resource.h b/ppapi/proxy/broker_resource.h
index 23310934..60f6fdb2a 100644
--- a/ppapi/proxy/broker_resource.h
+++ b/ppapi/proxy/broker_resource.h
@@ -5,6 +5,7 @@
 #ifndef PPAPI_PROXY_BROKER_RESOURCE_H_
 #define PPAPI_PROXY_BROKER_RESOURCE_H_
 
+#include "base/macros.h"
 #include "ppapi/proxy/connection.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/thunk/ppb_broker_api.h"
diff --git a/ppapi/proxy/browser_font_singleton_resource.h b/ppapi/proxy/browser_font_singleton_resource.h
index ddbb690..bc332db 100644
--- a/ppapi/proxy/browser_font_singleton_resource.h
+++ b/ppapi/proxy/browser_font_singleton_resource.h
@@ -5,6 +5,7 @@
 #ifndef PPAPI_PROXY_BROWSER_FONT_SINGLETON_RESOURCE_H_
 #define PPAPI_PROXY_BROWSER_FONT_SINGLETON_RESOURCE_H_
 
+#include "base/macros.h"
 #include "ppapi/proxy/connection.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/thunk/ppb_browser_font_singleton_api.h"
diff --git a/ppapi/proxy/camera_capabilities_resource.h b/ppapi/proxy/camera_capabilities_resource.h
index 82e8df8..14431ce 100644
--- a/ppapi/proxy/camera_capabilities_resource.h
+++ b/ppapi/proxy/camera_capabilities_resource.h
@@ -5,9 +5,12 @@
 #ifndef PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_
 #define PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/shared_impl/resource.h"
diff --git a/ppapi/proxy/camera_device_resource.h b/ppapi/proxy/camera_device_resource.h
index 93878fe..d6ff4b78 100644
--- a/ppapi/proxy/camera_device_resource.h
+++ b/ppapi/proxy/camera_device_resource.h
@@ -5,7 +5,9 @@
 #ifndef PPAPI_PROXY_CAMERA_DEVICE_RESOURCE_H_
 #define PPAPI_PROXY_CAMERA_DEVICE_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/c/pp_size.h"
 #include "ppapi/c/private/pp_video_capture_format.h"
 #include "ppapi/proxy/connection.h"
diff --git a/ppapi/proxy/compositor_layer_resource.h b/ppapi/proxy/compositor_layer_resource.h
index 8d4dfd3e..7bc330a 100644
--- a/ppapi/proxy/compositor_layer_resource.h
+++ b/ppapi/proxy/compositor_layer_resource.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_
 #define PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/c/ppb_compositor_layer.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
diff --git a/ppapi/proxy/compositor_resource.h b/ppapi/proxy/compositor_resource.h
index 49ccf3d..366e3e7b 100644
--- a/ppapi/proxy/compositor_resource.h
+++ b/ppapi/proxy/compositor_resource.h
@@ -5,8 +5,11 @@
 #ifndef PPAPI_PROXY_COMPOSITOR_RESOURCE_H_
 #define PPAPI_PROXY_COMPOSITOR_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <map>
 
+#include "base/macros.h"
 #include "ppapi/proxy/compositor_layer_resource.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
diff --git a/ppapi/proxy/device_enumeration_resource_helper.cc b/ppapi/proxy/device_enumeration_resource_helper.cc
index 32a4e1db..45eee0e 100644
--- a/ppapi/proxy/device_enumeration_resource_helper.cc
+++ b/ppapi/proxy/device_enumeration_resource_helper.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/device_enumeration_resource_helper.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/logging.h"
 #include "base/memory/scoped_ptr.h"
diff --git a/ppapi/proxy/device_enumeration_resource_helper.h b/ppapi/proxy/device_enumeration_resource_helper.h
index cea3153..ea96ea2 100644
--- a/ppapi/proxy/device_enumeration_resource_helper.h
+++ b/ppapi/proxy/device_enumeration_resource_helper.h
@@ -5,9 +5,11 @@
 #ifndef PPAPI_PROXY_DEVICE_ENUMERATION_RESOURCE_HELPER_H_
 #define PPAPI_PROXY_DEVICE_ENUMERATION_RESOURCE_HELPER_H_
 
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "ppapi/c/dev/ppb_device_ref_dev.h"
diff --git a/ppapi/proxy/device_enumeration_resource_helper_unittest.cc b/ppapi/proxy/device_enumeration_resource_helper_unittest.cc
index 32bc68a..288942f 100644
--- a/ppapi/proxy/device_enumeration_resource_helper_unittest.cc
+++ b/ppapi/proxy/device_enumeration_resource_helper_unittest.cc
@@ -2,8 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/c/pp_errors.h"
 #include "ppapi/proxy/connection.h"
 #include "ppapi/proxy/device_enumeration_resource_helper.h"
diff --git a/ppapi/proxy/dispatcher.h b/ppapi/proxy/dispatcher.h
index 3028841..a00c550b 100644
--- a/ppapi/proxy/dispatcher.h
+++ b/ppapi/proxy/dispatcher.h
@@ -11,16 +11,17 @@
 
 #include "base/callback_forward.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/tracked_objects.h"
 #include "ipc/message_filter.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/pp_module.h"
 #include "ppapi/c/ppp.h"
-#include "ppapi/proxy/proxy_channel.h"
 #include "ppapi/proxy/interface_list.h"
 #include "ppapi/proxy/interface_proxy.h"
 #include "ppapi/proxy/plugin_var_tracker.h"
+#include "ppapi/proxy/proxy_channel.h"
 #include "ppapi/shared_impl/api_id.h"
 
 namespace IPC {
diff --git a/ppapi/proxy/enter_proxy.h b/ppapi/proxy/enter_proxy.h
index 4ad67b1..b7dbef2 100644
--- a/ppapi/proxy/enter_proxy.h
+++ b/ppapi/proxy/enter_proxy.h
@@ -5,6 +5,8 @@
 #ifndef PPAPI_PROXY_ENTER_PROXY_H_
 #define PPAPI_PROXY_ENTER_PROXY_H_
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "ppapi/cpp/completion_callback.h"
 #include "ppapi/proxy/host_dispatcher.h"
diff --git a/ppapi/proxy/file_chooser_resource.cc b/ppapi/proxy/file_chooser_resource.cc
index f1d045b..dc70cbd 100644
--- a/ppapi/proxy/file_chooser_resource.cc
+++ b/ppapi/proxy/file_chooser_resource.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/file_chooser_resource.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/strings/string_split.h"
 #include "ipc/ipc_message.h"
diff --git a/ppapi/proxy/file_chooser_resource.h b/ppapi/proxy/file_chooser_resource.h
index 0347fb07..05d01d3 100644
--- a/ppapi/proxy/file_chooser_resource.h
+++ b/ppapi/proxy/file_chooser_resource.h
@@ -5,10 +5,13 @@
 #ifndef PPAPI_PROXY_FILE_CHOOSER_RESOURCE_H_
 #define PPAPI_PROXY_FILE_CHOOSER_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <queue>
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/shared_impl/array_writer.h"
diff --git a/ppapi/proxy/file_chooser_resource_unittest.cc b/ppapi/proxy/file_chooser_resource_unittest.cc
index a97b9c9f..e6ad3ed2 100644
--- a/ppapi/proxy/file_chooser_resource_unittest.cc
+++ b/ppapi/proxy/file_chooser_resource_unittest.cc
@@ -2,6 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/message_loop/message_loop.h"
 #include "ppapi/c/dev/ppb_file_chooser_dev.h"
 #include "ppapi/c/pp_errors.h"
diff --git a/ppapi/proxy/file_io_resource.h b/ppapi/proxy/file_io_resource.h
index f32879a43..9834c8e7 100644
--- a/ppapi/proxy/file_io_resource.h
+++ b/ppapi/proxy/file_io_resource.h
@@ -5,9 +5,12 @@
 #ifndef PPAPI_PROXY_FILE_IO_RESOURCE_H_
 #define PPAPI_PROXY_FILE_IO_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/files/file.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "ppapi/c/private/pp_file_handle.h"
diff --git a/ppapi/proxy/file_ref_resource.cc b/ppapi/proxy/file_ref_resource.cc
index ee56969..79e95dc 100644
--- a/ppapi/proxy/file_ref_resource.cc
+++ b/ppapi/proxy/file_ref_resource.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/file_ref_resource.h"
 
+#include <stddef.h>
+
 #include "base/numerics/safe_conversions.h"
 #include "ppapi/c/pp_directory_entry.h"
 #include "ppapi/c/pp_instance.h"
diff --git a/ppapi/proxy/file_ref_resource.h b/ppapi/proxy/file_ref_resource.h
index 59e7b7c9..2ed2cc7 100644
--- a/ppapi/proxy/file_ref_resource.h
+++ b/ppapi/proxy/file_ref_resource.h
@@ -5,9 +5,11 @@
 #ifndef PPAPI_PROXY_FILE_REF_RESOURCE_H_
 #define PPAPI_PROXY_FILE_REF_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/pp_resource.h"
diff --git a/ppapi/proxy/file_system_resource.h b/ppapi/proxy/file_system_resource.h
index 5b35f86..c03765c 100644
--- a/ppapi/proxy/file_system_resource.h
+++ b/ppapi/proxy/file_system_resource.h
@@ -5,10 +5,13 @@
 #ifndef PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_
 #define PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <queue>
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "ppapi/c/pp_file_info.h"
 #include "ppapi/c/pp_resource.h"
diff --git a/ppapi/proxy/file_system_resource_unittest.cc b/ppapi/proxy/file_system_resource_unittest.cc
index 9b5d981..d8917ce 100644
--- a/ppapi/proxy/file_system_resource_unittest.cc
+++ b/ppapi/proxy/file_system_resource_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "base/message_loop/message_loop.h"
 #include "ppapi/c/pp_errors.h"
 #include "ppapi/c/ppb_file_io.h"
diff --git a/ppapi/proxy/flash_clipboard_resource.cc b/ppapi/proxy/flash_clipboard_resource.cc
index 28df94c..e430dfd7 100644
--- a/ppapi/proxy/flash_clipboard_resource.cc
+++ b/ppapi/proxy/flash_clipboard_resource.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/flash_clipboard_resource.h"
 
+#include <stddef.h>
+
 #include "base/numerics/safe_conversions.h"
 #include "ipc/ipc_message.h"
 #include "ppapi/c/pp_errors.h"
diff --git a/ppapi/proxy/flash_clipboard_resource.h b/ppapi/proxy/flash_clipboard_resource.h
index cd607d6..ba17e41f 100644
--- a/ppapi/proxy/flash_clipboard_resource.h
+++ b/ppapi/proxy/flash_clipboard_resource.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_FLASH_CLIPBOARD_RESOURCE_H_
 #define PPAPI_PROXY_FLASH_CLIPBOARD_RESOURCE_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/proxy/connection.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/shared_impl/flash_clipboard_format_registry.h"
diff --git a/ppapi/proxy/flash_drm_resource.h b/ppapi/proxy/flash_drm_resource.h
index fc773c4..70e0c024 100644
--- a/ppapi/proxy/flash_drm_resource.h
+++ b/ppapi/proxy/flash_drm_resource.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_FLASH_DRM_RESOURCE_H_
 #define PPAPI_PROXY_FLASH_DRM_RESOURCE_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/shared_impl/tracked_callback.h"
diff --git a/ppapi/proxy/flash_file_resource.cc b/ppapi/proxy/flash_file_resource.cc
index 6b8fc6c..d696e5b 100644
--- a/ppapi/proxy/flash_file_resource.cc
+++ b/ppapi/proxy/flash_file_resource.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/flash_file_resource.h"
 
+#include <stddef.h>
+
 #include "base/files/file_path.h"
 #include "ipc/ipc_message.h"
 #include "ppapi/c/pp_errors.h"
diff --git a/ppapi/proxy/flash_file_resource.h b/ppapi/proxy/flash_file_resource.h
index ea35152..b45fbd5 100644
--- a/ppapi/proxy/flash_file_resource.h
+++ b/ppapi/proxy/flash_file_resource.h
@@ -5,8 +5,11 @@
 #ifndef PPAPI_PROXY_FLASH_FILE_RESOURCE_H_
 #define PPAPI_PROXY_FLASH_FILE_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <string>
 
+#include "base/macros.h"
 #include "ppapi/proxy/connection.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/shared_impl/file_path.h"
diff --git a/ppapi/proxy/flash_font_file_resource.h b/ppapi/proxy/flash_font_file_resource.h
index fada61d..4694734b 100644
--- a/ppapi/proxy/flash_font_file_resource.h
+++ b/ppapi/proxy/flash_font_file_resource.h
@@ -5,9 +5,12 @@
 #ifndef PPAPI_PROXY_FLASH_FONT_FILE_RESOURCE_H_
 #define PPAPI_PROXY_FLASH_FONT_FILE_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
 #include "ppapi/c/private/pp_private_font_charset.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/serialized_structs.h"
diff --git a/ppapi/proxy/flash_fullscreen_resource.cc b/ppapi/proxy/flash_fullscreen_resource.cc
index 90a68fcf..feab277 100644
--- a/ppapi/proxy/flash_fullscreen_resource.cc
+++ b/ppapi/proxy/flash_fullscreen_resource.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/flash_fullscreen_resource.h"
 
+#include <stdint.h>
+
 #include "ppapi/c/pp_bool.h"
 #include "ppapi/proxy/ppapi_messages.h"
 
diff --git a/ppapi/proxy/flash_fullscreen_resource.h b/ppapi/proxy/flash_fullscreen_resource.h
index b193e30..0c276a3c 100644
--- a/ppapi/proxy/flash_fullscreen_resource.h
+++ b/ppapi/proxy/flash_fullscreen_resource.h
@@ -5,6 +5,7 @@
 #ifndef PPAPI_PROXY_FLASH_FULLSCREEN_RESOURCE_H_
 #define PPAPI_PROXY_FLASH_FULLSCREEN_RESOURCE_H_
 
+#include "base/macros.h"
 #include "ppapi/proxy/connection.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/thunk/ppb_flash_fullscreen_api.h"
diff --git a/ppapi/proxy/flash_menu_resource.h b/ppapi/proxy/flash_menu_resource.h
index 23b7487..af0fe86f 100644
--- a/ppapi/proxy/flash_menu_resource.h
+++ b/ppapi/proxy/flash_menu_resource.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PROXY_FLASH_MENU_RESOURCE_H_
 #define PPAPI_PROXY_FLASH_MENU_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/shared_impl/tracked_callback.h"
 #include "ppapi/thunk/ppb_flash_menu_api.h"
diff --git a/ppapi/proxy/flash_resource.cc b/ppapi/proxy/flash_resource.cc
index 26a80ae..d8ec440 100644
--- a/ppapi/proxy/flash_resource.cc
+++ b/ppapi/proxy/flash_resource.cc
@@ -4,12 +4,15 @@
 
 #include "ppapi/proxy/flash_resource.h"
 
+#include <stddef.h>
+
 #include <cmath>
 
 #include "base/containers/mru_cache.h"
 #include "base/debug/crash_logging.h"
 #include "base/lazy_instance.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "ppapi/c/pp_errors.h"
 #include "ppapi/c/private/ppb_flash.h"
 #include "ppapi/c/trusted/ppb_browser_font_trusted.h"
@@ -118,7 +121,7 @@
   // Note that TimeTicks does not continue counting across sleep/resume on all
   // platforms. This may be acceptable for 10 seconds, but if in the future this
   // is changed to one minute or more, then we should consider using base::Time.
-  const int64 kMaxCachedLocalOffsetAgeInSeconds = 10;
+  const int64_t kMaxCachedLocalOffsetAgeInSeconds = 10;
   base::TimeDelta expiration_delta =
       base::TimeDelta::FromSeconds(kMaxCachedLocalOffsetAgeInSeconds);
 
diff --git a/ppapi/proxy/flash_resource.h b/ppapi/proxy/flash_resource.h
index 21cdbb73..df21778 100644
--- a/ppapi/proxy/flash_resource.h
+++ b/ppapi/proxy/flash_resource.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_FLASH_RESOURCE_H_
 #define PPAPI_PROXY_FLASH_RESOURCE_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/pp_var.h"
 #include "ppapi/c/private/ppb_flash.h"
diff --git a/ppapi/proxy/flash_resource_unittest.cc b/ppapi/proxy/flash_resource_unittest.cc
index 1a5e7c64..a4815b7 100644
--- a/ppapi/proxy/flash_resource_unittest.cc
+++ b/ppapi/proxy/flash_resource_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "ppapi/c/dev/ppb_video_capture_dev.h"
 #include "ppapi/c/pp_errors.h"
 #include "ppapi/c/private/ppb_flash.h"
diff --git a/ppapi/proxy/gamepad_resource.h b/ppapi/proxy/gamepad_resource.h
index 4851d69c..b2aeca4 100644
--- a/ppapi/proxy/gamepad_resource.h
+++ b/ppapi/proxy/gamepad_resource.h
@@ -5,8 +5,8 @@
 #ifndef PPAPI_PROXY_GAMEPAD_RESOURCE_H_
 #define PPAPI_PROXY_GAMEPAD_RESOURCE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "ppapi/c/ppb_gamepad.h"
diff --git a/ppapi/proxy/graphics_2d_resource.cc b/ppapi/proxy/graphics_2d_resource.cc
index 0cf7465..3b91a6a 100644
--- a/ppapi/proxy/graphics_2d_resource.cc
+++ b/ppapi/proxy/graphics_2d_resource.cc
@@ -32,9 +32,10 @@
       scale_(1.0f) {
   // These checks are copied from PPB_ImageData_Impl::Init to make tests passed.
   // Let's remove/refactor this when start to refactor ImageData.
-  bool bad_args = size.width <= 0 || size.height <= 0 ||
-      static_cast<int64>(size.width) * static_cast<int64>(size.height) >=
-          std::numeric_limits<int32>::max() / 4;
+  bool bad_args =
+      size.width <= 0 || size.height <= 0 ||
+      static_cast<int64_t>(size.width) * static_cast<int64_t>(size.height) >=
+          std::numeric_limits<int32_t>::max() / 4;
   if (!bad_args && !sent_create_to_renderer()) {
     SendCreate(RENDERER,
         PpapiHostMsg_Graphics2D_Create(size, is_always_opaque));
diff --git a/ppapi/proxy/graphics_2d_resource.h b/ppapi/proxy/graphics_2d_resource.h
index efd7d760..7c8fb69 100644
--- a/ppapi/proxy/graphics_2d_resource.h
+++ b/ppapi/proxy/graphics_2d_resource.h
@@ -5,7 +5,10 @@
 #ifndef PPAPI_PROXY_GRAPHICS_2D_RESOURCE_H_
 #define PPAPI_PROXY_GRAPHICS_2D_RESOURCE_H_
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/thunk/ppb_graphics_2d_api.h"
diff --git a/ppapi/proxy/host_dispatcher.cc b/ppapi/proxy/host_dispatcher.cc
index eb9f7ee..5d61429fa 100644
--- a/ppapi/proxy/host_dispatcher.cc
+++ b/ppapi/proxy/host_dispatcher.cc
@@ -4,10 +4,12 @@
 
 #include "ppapi/proxy/host_dispatcher.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "base/trace_event/trace_event.h"
-#include "ppapi/c/private/ppb_proxy_private.h"
 #include "ppapi/c/ppb_var.h"
+#include "ppapi/c/private/ppb_proxy_private.h"
 #include "ppapi/proxy/host_var_serialization_rules.h"
 #include "ppapi/proxy/interface_list.h"
 #include "ppapi/proxy/ppapi_messages.h"
diff --git a/ppapi/proxy/host_dispatcher.h b/ppapi/proxy/host_dispatcher.h
index 8c8e948..35daf56 100644
--- a/ppapi/proxy/host_dispatcher.h
+++ b/ppapi/proxy/host_dispatcher.h
@@ -10,6 +10,7 @@
 #include <vector>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/process/process.h"
diff --git a/ppapi/proxy/host_resolver_private_resource.h b/ppapi/proxy/host_resolver_private_resource.h
index d83b707b..14da867 100644
--- a/ppapi/proxy/host_resolver_private_resource.h
+++ b/ppapi/proxy/host_resolver_private_resource.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PROXY_HOST_RESOLVER_PRIVATE_RESOURCE_H_
 #define PPAPI_PROXY_HOST_RESOLVER_PRIVATE_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/host_resolver_resource_base.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/thunk/ppb_host_resolver_private_api.h"
diff --git a/ppapi/proxy/host_resolver_resource.h b/ppapi/proxy/host_resolver_resource.h
index ae6c524d..034b741 100644
--- a/ppapi/proxy/host_resolver_resource.h
+++ b/ppapi/proxy/host_resolver_resource.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PROXY_HOST_RESOLVER_RESOURCE_H_
 #define PPAPI_PROXY_HOST_RESOLVER_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/host_resolver_resource_base.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/thunk/ppb_host_resolver_api.h"
diff --git a/ppapi/proxy/host_resolver_resource_base.h b/ppapi/proxy/host_resolver_resource_base.h
index d27d9888..2147ba9 100644
--- a/ppapi/proxy/host_resolver_resource_base.h
+++ b/ppapi/proxy/host_resolver_resource_base.h
@@ -5,11 +5,13 @@
 #ifndef PPAPI_PROXY_HOST_RESOLVER_RESOURCE_BASE_H_
 #define PPAPI_PROXY_HOST_RESOLVER_RESOURCE_BASE_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "ppapi/c/private/ppb_host_resolver_private.h"
 #include "ppapi/proxy/plugin_resource.h"
diff --git a/ppapi/proxy/host_var_serialization_rules.h b/ppapi/proxy/host_var_serialization_rules.h
index 8de6cdec..404312f 100644
--- a/ppapi/proxy/host_var_serialization_rules.h
+++ b/ppapi/proxy/host_var_serialization_rules.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "ppapi/c/ppb_var.h"
 #include "ppapi/proxy/var_serialization_rules.h"
 
diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc
index db7a67a9..eca4626d 100644
--- a/ppapi/proxy/interface_list.cc
+++ b/ppapi/proxy/interface_list.cc
@@ -4,9 +4,12 @@
 
 #include "ppapi/proxy/interface_list.h"
 
+#include <stdint.h>
+
 #include "base/hash.h"
 #include "base/lazy_instance.h"
 #include "base/memory/singleton.h"
+#include "build/build_config.h"
 #include "ppapi/c/dev/ppb_audio_input_dev.h"
 #include "ppapi/c/dev/ppb_buffer_dev.h"
 #include "ppapi/c/dev/ppb_char_set_dev.h"
@@ -26,6 +29,7 @@
 #include "ppapi/c/dev/ppb_var_deprecated.h"
 #include "ppapi/c/dev/ppb_video_capture_dev.h"
 #include "ppapi/c/dev/ppb_view_dev.h"
+#include "ppapi/c/pp_errors.h"
 #include "ppapi/c/ppb_audio.h"
 #include "ppapi/c/ppb_audio_buffer.h"
 #include "ppapi/c/ppb_audio_config.h"
@@ -67,7 +71,6 @@
 #include "ppapi/c/ppb_video_encoder.h"
 #include "ppapi/c/ppb_video_frame.h"
 #include "ppapi/c/ppb_view.h"
-#include "ppapi/c/pp_errors.h"
 #include "ppapi/c/ppp_instance.h"
 #include "ppapi/c/private/ppb_camera_capabilities_private.h"
 #include "ppapi/c/private/ppb_camera_device_private.h"
@@ -76,13 +79,13 @@
 #include "ppapi/c/private/ppb_file_io_private.h"
 #include "ppapi/c/private/ppb_file_ref_private.h"
 #include "ppapi/c/private/ppb_find_private.h"
+#include "ppapi/c/private/ppb_flash.h"
 #include "ppapi/c/private/ppb_flash_clipboard.h"
+#include "ppapi/c/private/ppb_flash_device_id.h"
+#include "ppapi/c/private/ppb_flash_drm.h"
 #include "ppapi/c/private/ppb_flash_file.h"
 #include "ppapi/c/private/ppb_flash_font_file.h"
 #include "ppapi/c/private/ppb_flash_fullscreen.h"
-#include "ppapi/c/private/ppb_flash.h"
-#include "ppapi/c/private/ppb_flash_device_id.h"
-#include "ppapi/c/private/ppb_flash_drm.h"
 #include "ppapi/c/private/ppb_flash_menu.h"
 #include "ppapi/c/private/ppb_flash_message_loop.h"
 #include "ppapi/c/private/ppb_flash_print.h"
@@ -408,7 +411,7 @@
 }
 
 int InterfaceList::HashInterfaceName(const std::string& name) {
-  uint32 data = base::Hash(name.c_str(), name.size());
+  uint32_t data = base::Hash(name.c_str(), name.size());
   // Strip off the signed bit because UMA doesn't support negative values,
   // but takes a signed int as input.
   return static_cast<int>(data & 0x7fffffff);
diff --git a/ppapi/proxy/interface_list.h b/ppapi/proxy/interface_list.h
index 2fec61f..f3172411 100644
--- a/ppapi/proxy/interface_list.h
+++ b/ppapi/proxy/interface_list.h
@@ -8,8 +8,8 @@
 #include <map>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
 #include "base/synchronization/lock.h"
 #include "ppapi/proxy/interface_proxy.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
diff --git a/ppapi/proxy/interface_proxy.h b/ppapi/proxy/interface_proxy.h
index 099d58b..6cfd7d76 100644
--- a/ppapi/proxy/interface_proxy.h
+++ b/ppapi/proxy/interface_proxy.h
@@ -5,7 +5,6 @@
 #ifndef PPAPI_PROXY_INTERFACE_PROXY_H_
 #define PPAPI_PROXY_INTERFACE_PROXY_H_
 
-#include "base/basictypes.h"
 #include "ipc/ipc_listener.h"
 #include "ipc/ipc_sender.h"
 #include "ppapi/c/pp_completion_callback.h"
diff --git a/ppapi/proxy/isolated_file_system_private_resource.h b/ppapi/proxy/isolated_file_system_private_resource.h
index 55ff23e..a9e659f 100644
--- a/ppapi/proxy/isolated_file_system_private_resource.h
+++ b/ppapi/proxy/isolated_file_system_private_resource.h
@@ -19,8 +19,11 @@
 #ifndef PPAPI_PROXY_ISOLATED_FILE_SYSTEM_PRIVATE_RESOURCE_H_
 #define PPAPI_PROXY_ISOLATED_FILE_SYSTEM_PRIVATE_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "ppapi/proxy/connection.h"
 #include "ppapi/proxy/plugin_resource.h"
diff --git a/ppapi/proxy/locking_resource_releaser.h b/ppapi/proxy/locking_resource_releaser.h
index d390ac44..d770df62f 100644
--- a/ppapi/proxy/locking_resource_releaser.h
+++ b/ppapi/proxy/locking_resource_releaser.h
@@ -5,6 +5,7 @@
 #ifndef PPAPI_PROXY_LOCKING_RESOURCE_RELEASER_H_
 #define PPAPI_PROXY_LOCKING_RESOURCE_RELEASER_H_
 
+#include "base/macros.h"
 #include "ppapi/shared_impl/ppapi_globals.h"
 #include "ppapi/shared_impl/proxy_lock.h"
 #include "ppapi/shared_impl/resource_tracker.h"
diff --git a/ppapi/proxy/media_stream_audio_track_resource.h b/ppapi/proxy/media_stream_audio_track_resource.h
index 566f42d9..3c25726 100644
--- a/ppapi/proxy/media_stream_audio_track_resource.h
+++ b/ppapi/proxy/media_stream_audio_track_resource.h
@@ -5,9 +5,12 @@
 #ifndef PPAPI_PROXY_MEDIA_STREAM_AUDIO_TRACK_RESOURCE_H_
 #define PPAPI_PROXY_MEDIA_STREAM_AUDIO_TRACK_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "ppapi/proxy/media_stream_track_resource_base.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
diff --git a/ppapi/proxy/media_stream_track_resource_base.cc b/ppapi/proxy/media_stream_track_resource_base.cc
index 12ebdb7c..16d5499 100644
--- a/ppapi/proxy/media_stream_track_resource_base.cc
+++ b/ppapi/proxy/media_stream_track_resource_base.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/media_stream_track_resource_base.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "ppapi/proxy/ppapi_messages.h"
 
diff --git a/ppapi/proxy/media_stream_track_resource_base.h b/ppapi/proxy/media_stream_track_resource_base.h
index 0e7e9cc..1de5d0d 100644
--- a/ppapi/proxy/media_stream_track_resource_base.h
+++ b/ppapi/proxy/media_stream_track_resource_base.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_MEDIA_STREAM_TRACK_RESOURCE_BASE_H_
 #define PPAPI_PROXY_MEDIA_STREAM_TRACK_RESOURCE_BASE_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/shared_impl/media_stream_buffer_manager.h"
diff --git a/ppapi/proxy/media_stream_video_track_resource.h b/ppapi/proxy/media_stream_video_track_resource.h
index b6102ec..1b18cfa 100644
--- a/ppapi/proxy/media_stream_video_track_resource.h
+++ b/ppapi/proxy/media_stream_video_track_resource.h
@@ -5,8 +5,11 @@
 #ifndef PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_
 #define PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <map>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "ppapi/proxy/media_stream_track_resource_base.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
diff --git a/ppapi/proxy/message_handler.h b/ppapi/proxy/message_handler.h
index cb3c6ab..6a83f21 100644
--- a/ppapi/proxy/message_handler.h
+++ b/ppapi/proxy/message_handler.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_MESSAGE_HANDLER_H_
 #define PPAPI_PROXY_MESSAGE_HANDLER_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "ppapi/c/pp_resource.h"
diff --git a/ppapi/proxy/mock_resource.h b/ppapi/proxy/mock_resource.h
index 768929d..ed894bda 100644
--- a/ppapi/proxy/mock_resource.h
+++ b/ppapi/proxy/mock_resource.h
@@ -5,6 +5,7 @@
 #ifndef PPAPI_PROXY_MOCK_RESOURCE_H_
 #define PPAPI_PROXY_MOCK_RESOURCE_H_
 
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/shared_impl/resource.h"
 
diff --git a/ppapi/proxy/nacl_message_scanner.cc b/ppapi/proxy/nacl_message_scanner.cc
index ee09be0..c95287e 100644
--- a/ppapi/proxy/nacl_message_scanner.cc
+++ b/ppapi/proxy/nacl_message_scanner.cc
@@ -4,10 +4,13 @@
 
 #include "ppapi/proxy/nacl_message_scanner.h"
 
+#include <stddef.h>
+
 #include <utility>
 #include <vector>
 
 #include "base/bind.h"
+#include "build/build_config.h"
 #include "ipc/ipc_message.h"
 #include "ipc/ipc_message_macros.h"
 #include "ppapi/proxy/ppapi_messages.h"
diff --git a/ppapi/proxy/nacl_message_scanner.h b/ppapi/proxy/nacl_message_scanner.h
index 6a03923..8c5f766 100644
--- a/ppapi/proxy/nacl_message_scanner.h
+++ b/ppapi/proxy/nacl_message_scanner.h
@@ -5,10 +5,12 @@
 #ifndef PPAPI_PROXY_NACL_MESSAGE_SCANNER_H_
 #define PPAPI_PROXY_NACL_MESSAGE_SCANNER_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
 #include "ppapi/c/pp_resource.h"
diff --git a/ppapi/proxy/nacl_message_scanner_unittest.cc b/ppapi/proxy/nacl_message_scanner_unittest.cc
index 41b1e01..2ca5a289 100644
--- a/ppapi/proxy/nacl_message_scanner_unittest.cc
+++ b/ppapi/proxy/nacl_message_scanner_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "ipc/ipc_message.h"
 #include "ppapi/proxy/nacl_message_scanner.h"
 #include "ppapi/proxy/ppapi_messages.h"
diff --git a/ppapi/proxy/net_address_resource.h b/ppapi/proxy/net_address_resource.h
index fe17ec6..f5448966 100644
--- a/ppapi/proxy/net_address_resource.h
+++ b/ppapi/proxy/net_address_resource.h
@@ -5,8 +5,8 @@
 #ifndef PPAPI_PROXY_NET_ADDRESS_RESOURCE_H_
 #define PPAPI_PROXY_NET_ADDRESS_RESOURCE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/c/private/ppb_net_address_private.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
diff --git a/ppapi/proxy/network_list_resource.cc b/ppapi/proxy/network_list_resource.cc
index 466e533..f4ec7ed 100644
--- a/ppapi/proxy/network_list_resource.cc
+++ b/ppapi/proxy/network_list_resource.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/network_list_resource.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "base/logging.h"
diff --git a/ppapi/proxy/network_list_resource.h b/ppapi/proxy/network_list_resource.h
index 005b752b..66ea8aa 100644
--- a/ppapi/proxy/network_list_resource.h
+++ b/ppapi/proxy/network_list_resource.h
@@ -5,10 +5,12 @@
 #ifndef PPAPI_PROXY_NETWORK_LIST_RESOURCE_H_
 #define PPAPI_PROXY_NETWORK_LIST_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "ppapi/c/private/ppb_net_address_private.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
diff --git a/ppapi/proxy/network_monitor_resource.h b/ppapi/proxy/network_monitor_resource.h
index 2fb91e7..77b3e61 100644
--- a/ppapi/proxy/network_monitor_resource.h
+++ b/ppapi/proxy/network_monitor_resource.h
@@ -5,8 +5,11 @@
 #ifndef PPAPI_PROXY_NETWORK_MONITOR_RESOURCE_H_
 #define PPAPI_PROXY_NETWORK_MONITOR_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <list>
 
+#include "base/macros.h"
 #include "ppapi/proxy/network_list_resource.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/shared_impl/scoped_pp_resource.h"
diff --git a/ppapi/proxy/network_proxy_resource.h b/ppapi/proxy/network_proxy_resource.h
index b48089d..646e046 100644
--- a/ppapi/proxy/network_proxy_resource.h
+++ b/ppapi/proxy/network_proxy_resource.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_NETWORK_PROXY_RESOURCE_H_
 #define PPAPI_PROXY_NETWORK_PROXY_RESOURCE_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/thunk/ppb_network_proxy_api.h"
diff --git a/ppapi/proxy/output_protection_resource.h b/ppapi/proxy/output_protection_resource.h
index 25dcc53..b18dfc5 100644
--- a/ppapi/proxy/output_protection_resource.h
+++ b/ppapi/proxy/output_protection_resource.h
@@ -5,7 +5,10 @@
 #ifndef PPAPI_PROXY_OUTPUT_PROTECTION_RESOURCE_H_
 #define PPAPI_PROXY_OUTPUT_PROTECTION_RESOURCE_H_
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/c/private/ppb_output_protection_private.h"
 #include "ppapi/proxy/device_enumeration_resource_helper.h"
 #include "ppapi/proxy/plugin_resource.h"
diff --git a/ppapi/proxy/pdf_resource.cc b/ppapi/proxy/pdf_resource.cc
index d3aad14b..914e6957 100644
--- a/ppapi/proxy/pdf_resource.cc
+++ b/ppapi/proxy/pdf_resource.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/pdf_resource.h"
 
+#include <stddef.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/ppapi/proxy/pdf_resource.h b/ppapi/proxy/pdf_resource.h
index 253f619..4420cc70 100644
--- a/ppapi/proxy/pdf_resource.h
+++ b/ppapi/proxy/pdf_resource.h
@@ -5,8 +5,8 @@
 #ifndef PPAPI_PROXY_PDF_RESOURCE_H_
 #define PPAPI_PROXY_PDF_RESOURCE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/pp_var.h"
 #include "ppapi/proxy/connection.h"
diff --git a/ppapi/proxy/platform_verification_private_resource.cc b/ppapi/proxy/platform_verification_private_resource.cc
index 27804d36..ac709c2 100644
--- a/ppapi/proxy/platform_verification_private_resource.cc
+++ b/ppapi/proxy/platform_verification_private_resource.cc
@@ -56,7 +56,7 @@
     return PP_ERROR_BADARGUMENT;
 
   uint8_t* challenge_data = static_cast<uint8_t*>(challenge_buffer->Map());
-  uint32 challenge_length = challenge_buffer->ByteLength();
+  uint32_t challenge_length = challenge_buffer->ByteLength();
   std::vector<uint8_t> challenge_vector(challenge_data,
                                         challenge_data + challenge_length);
   challenge_buffer->Unmap();
diff --git a/ppapi/proxy/platform_verification_private_resource.h b/ppapi/proxy/platform_verification_private_resource.h
index 072b3f8..ae3cd13 100644
--- a/ppapi/proxy/platform_verification_private_resource.h
+++ b/ppapi/proxy/platform_verification_private_resource.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_PLATFORM_VERIFICATION_PRIVATE_RESOURCE_H_
 #define PPAPI_PROXY_PLATFORM_VERIFICATION_PRIVATE_RESOURCE_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/thunk/ppb_platform_verification_api.h"
diff --git a/ppapi/proxy/plugin_array_buffer_var.cc b/ppapi/proxy/plugin_array_buffer_var.cc
index 7dd64d1..625facf 100644
--- a/ppapi/proxy/plugin_array_buffer_var.cc
+++ b/ppapi/proxy/plugin_array_buffer_var.cc
@@ -26,17 +26,14 @@
 
 namespace ppapi {
 
-PluginArrayBufferVar::PluginArrayBufferVar(uint32 size_in_bytes)
+PluginArrayBufferVar::PluginArrayBufferVar(uint32_t size_in_bytes)
     : buffer_(size_in_bytes),
       plugin_handle_(base::SharedMemory::NULLHandle()),
-      size_in_bytes_(size_in_bytes) {
-}
+      size_in_bytes_(size_in_bytes) {}
 
-PluginArrayBufferVar::PluginArrayBufferVar(uint32 size_in_bytes,
+PluginArrayBufferVar::PluginArrayBufferVar(uint32_t size_in_bytes,
                                            SharedMemoryHandle plugin_handle)
-    : plugin_handle_(plugin_handle),
-      size_in_bytes_(size_in_bytes) {
-}
+    : plugin_handle_(plugin_handle), size_in_bytes_(size_in_bytes) {}
 
 PluginArrayBufferVar::~PluginArrayBufferVar() {
   Unmap();
@@ -72,7 +69,7 @@
     shmem_->Unmap();
 }
 
-uint32 PluginArrayBufferVar::ByteLength() {
+uint32_t PluginArrayBufferVar::ByteLength() {
   return size_in_bytes_;
 }
 
diff --git a/ppapi/proxy/plugin_array_buffer_var.h b/ppapi/proxy/plugin_array_buffer_var.h
index ee9b9306..8f6fe198 100644
--- a/ppapi/proxy/plugin_array_buffer_var.h
+++ b/ppapi/proxy/plugin_array_buffer_var.h
@@ -7,7 +7,7 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "ppapi/c/pp_instance.h"
@@ -20,15 +20,15 @@
 // owned as a vector.
 class PluginArrayBufferVar : public ArrayBufferVar {
  public:
-  explicit PluginArrayBufferVar(uint32 size_in_bytes);
-  PluginArrayBufferVar(uint32 size_in_bytes,
+  explicit PluginArrayBufferVar(uint32_t size_in_bytes);
+  PluginArrayBufferVar(uint32_t size_in_bytes,
                        base::SharedMemoryHandle plugin_handle);
   ~PluginArrayBufferVar() override;
 
   // ArrayBufferVar implementation.
   void* Map() override;
   void Unmap() override;
-  uint32 ByteLength() override;
+  uint32_t ByteLength() override;
   bool CopyToNewShmem(
       PP_Instance instance,
       int* host_handle,
@@ -36,12 +36,12 @@
 
  private:
   // Non-shared memory
-  std::vector<uint8> buffer_;
+  std::vector<uint8_t> buffer_;
 
   // Shared memory
   base::SharedMemoryHandle plugin_handle_;
   scoped_ptr<base::SharedMemory> shmem_;
-  uint32 size_in_bytes_;
+  uint32_t size_in_bytes_;
 
   DISALLOW_COPY_AND_ASSIGN(PluginArrayBufferVar);
 };
diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc
index 80fec1f6..fd5f72c 100644
--- a/ppapi/proxy/plugin_dispatcher.cc
+++ b/ppapi/proxy/plugin_dispatcher.cc
@@ -11,6 +11,7 @@
 #include "base/message_loop/message_loop.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "ipc/ipc_message.h"
 #include "ipc/ipc_sync_channel.h"
 #include "ipc/ipc_sync_message_filter.h"
diff --git a/ppapi/proxy/plugin_dispatcher.h b/ppapi/proxy/plugin_dispatcher.h
index 159e69ca..5dc2273 100644
--- a/ppapi/proxy/plugin_dispatcher.h
+++ b/ppapi/proxy/plugin_dispatcher.h
@@ -5,12 +5,14 @@
 #ifndef PPAPI_PROXY_PLUGIN_DISPATCHER_H_
 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_
 
+#include <stdint.h>
+
 #include <set>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/containers/hash_tables.h"
 #include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/process/process.h"
@@ -74,7 +76,7 @@
     ~FlushInfo();
     bool flush_pending;
     HostResource resource;
-    int32 put_offset;
+    int32_t put_offset;
   };
   FlushInfo flush_info_;
 };
@@ -94,8 +96,8 @@
     // Registers the plugin dispatcher and returns an ID.
     // Plugin dispatcher IDs will be used to dispatch messages from the browser.
     // Each call to Register() has to be matched with a call to Unregister().
-    virtual uint32 Register(PluginDispatcher* plugin_dispatcher) = 0;
-    virtual void Unregister(uint32 plugin_dispatcher_id) = 0;
+    virtual uint32_t Register(PluginDispatcher* plugin_dispatcher) = 0;
+    virtual void Unregister(uint32_t plugin_dispatcher_id) = 0;
   };
 
   // Constructor for the plugin side. The init and shutdown functions will be
@@ -181,7 +183,7 @@
   // Returns the Preferences.
   const Preferences& preferences() const { return preferences_; }
 
-  uint32 plugin_dispatcher_id() const { return plugin_dispatcher_id_; }
+  uint32_t plugin_dispatcher_id() const { return plugin_dispatcher_id_; }
   bool incognito() const { return incognito_; }
 
  private:
@@ -215,7 +217,7 @@
   bool received_preferences_;
   Preferences preferences_;
 
-  uint32 plugin_dispatcher_id_;
+  uint32_t plugin_dispatcher_id_;
 
   // Set to true when the instances associated with this dispatcher are
   // incognito mode.
diff --git a/ppapi/proxy/plugin_globals.cc b/ppapi/proxy/plugin_globals.cc
index 64ff47b4..765ec64 100644
--- a/ppapi/proxy/plugin_globals.cc
+++ b/ppapi/proxy/plugin_globals.cc
@@ -5,6 +5,7 @@
 #include "ppapi/proxy/plugin_globals.h"
 
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/task_runner.h"
 #include "base/threading/thread.h"
diff --git a/ppapi/proxy/plugin_globals.h b/ppapi/proxy/plugin_globals.h
index 28cfe48..5075f81f 100644
--- a/ppapi/proxy/plugin_globals.h
+++ b/ppapi/proxy/plugin_globals.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_local_storage.h"
diff --git a/ppapi/proxy/plugin_resource.h b/ppapi/proxy/plugin_resource.h
index 0f21240..0fabab2 100644
--- a/ppapi/proxy/plugin_resource.h
+++ b/ppapi/proxy/plugin_resource.h
@@ -5,10 +5,12 @@
 #ifndef PPAPI_PROXY_PLUGIN_RESOURCE_H_
 #define PPAPI_PROXY_PLUGIN_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <map>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "ipc/ipc_message.h"
 #include "ipc/ipc_sender.h"
diff --git a/ppapi/proxy/plugin_resource_tracker.h b/ppapi/proxy/plugin_resource_tracker.h
index 7dbeb61..df6e6be 100644
--- a/ppapi/proxy/plugin_resource_tracker.h
+++ b/ppapi/proxy/plugin_resource_tracker.h
@@ -10,10 +10,11 @@
 
 #include "base/compiler_specific.h"
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "ppapi/c/pp_completion_callback.h"
 #include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_stdint.h"
 #include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_stdint.h"
 #include "ppapi/c/pp_var.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/shared_impl/host_resource.h"
diff --git a/ppapi/proxy/plugin_resource_var.h b/ppapi/proxy/plugin_resource_var.h
index 461dbfd..2f7d0858 100644
--- a/ppapi/proxy/plugin_resource_var.h
+++ b/ppapi/proxy/plugin_resource_var.h
@@ -5,6 +5,7 @@
 #ifndef PPAPI_PROXY_PLUGIN_RESOURCE_VAR_H_
 #define PPAPI_PROXY_PLUGIN_RESOURCE_VAR_H_
 
+#include "base/macros.h"
 #include "ppapi/c/pp_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/shared_impl/resource.h"
diff --git a/ppapi/proxy/plugin_var_serialization_rules.h b/ppapi/proxy/plugin_var_serialization_rules.h
index 1616a755..1f11669 100644
--- a/ppapi/proxy/plugin_var_serialization_rules.h
+++ b/ppapi/proxy/plugin_var_serialization_rules.h
@@ -5,7 +5,7 @@
 #ifndef PPAPI_PROXY_PLUGIN_VAR_SERIALIZATION_RULES_H_
 #define PPAPI_PROXY_PLUGIN_VAR_SERIALIZATION_RULES_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "ppapi/proxy/var_serialization_rules.h"
 
diff --git a/ppapi/proxy/plugin_var_tracker.cc b/ppapi/proxy/plugin_var_tracker.cc
index 81f313ca..f7e68f8 100644
--- a/ppapi/proxy/plugin_var_tracker.cc
+++ b/ppapi/proxy/plugin_var_tracker.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/plugin_var_tracker.h"
 
+#include <stddef.h>
+
 #include "base/memory/ref_counted.h"
 #include "base/memory/singleton.h"
 #include "ipc/ipc_message.h"
@@ -37,10 +39,8 @@
 
 }  // namespace
 
-PluginVarTracker::HostVar::HostVar(PluginDispatcher* d, int32 i)
-    : dispatcher(d),
-      host_object_id(i) {
-}
+PluginVarTracker::HostVar::HostVar(PluginDispatcher* d, int32_t i)
+    : dispatcher(d), host_object_id(i) {}
 
 bool PluginVarTracker::HostVar::operator<(const HostVar& other) const {
   if (dispatcher < other.dispatcher)
@@ -159,7 +159,7 @@
 
   // Convert the host object to a normal var valid in the plugin.
   HostVarToPluginVarMap::iterator found = host_var_to_plugin_var_.find(
-      HostVar(dispatcher, static_cast<int32>(host_object.value.as_id)));
+      HostVar(dispatcher, static_cast<int32_t>(host_object.value.as_id)));
   if (found == host_var_to_plugin_var_.end()) {
     NOTREACHED();
     return;
@@ -303,12 +303,12 @@
   }
 }
 
-ArrayBufferVar* PluginVarTracker::CreateArrayBuffer(uint32 size_in_bytes) {
+ArrayBufferVar* PluginVarTracker::CreateArrayBuffer(uint32_t size_in_bytes) {
   return new PluginArrayBufferVar(size_in_bytes);
 }
 
 ArrayBufferVar* PluginVarTracker::CreateShmArrayBuffer(
-    uint32 size_in_bytes,
+    uint32_t size_in_bytes,
     base::SharedMemoryHandle handle) {
   return new PluginArrayBufferVar(size_in_bytes, handle);
 }
@@ -353,9 +353,9 @@
   return found->second.ppp_class == ppp_class;
 }
 
-int32 PluginVarTracker::AddVarInternal(Var* var, AddVarRefMode mode) {
+int32_t PluginVarTracker::AddVarInternal(Var* var, AddVarRefMode mode) {
   // Normal adding.
-  int32 new_id = VarTracker::AddVarInternal(var, mode);
+  int32_t new_id = VarTracker::AddVarInternal(var, mode);
 
   // Need to add proxy objects to the host var map.
   ProxyObjectVar* proxy_object = var->AsProxyObjectVar();
@@ -443,7 +443,7 @@
 PP_Var PluginVarTracker::GetOrCreateObjectVarID(ProxyObjectVar* object) {
   // We can't use object->GetPPVar() because we don't want to affect the
   // refcount, so we have to add everything manually here.
-  int32 var_id = object->GetExistingVarID();
+  int32_t var_id = object->GetExistingVarID();
   if (!var_id) {
     var_id = AddVarInternal(object, ADD_VAR_CREATE_WITH_NO_REFERENCE);
     object->AssignVarID(var_id);
@@ -481,7 +481,7 @@
   if (found == host_var_to_plugin_var_.end()) {
     // Create a new object.
     return scoped_refptr<ProxyObjectVar>(
-        new ProxyObjectVar(dispatcher, static_cast<int32>(var.value.as_id)));
+        new ProxyObjectVar(dispatcher, static_cast<int32_t>(var.value.as_id)));
   }
 
   // Have this host var, look up the object.
@@ -498,7 +498,7 @@
 
 int PluginVarTracker::TrackSharedMemoryHandle(PP_Instance instance,
                                               base::SharedMemoryHandle handle,
-                                              uint32 size_in_bytes) {
+                                              uint32_t size_in_bytes) {
   NOTREACHED();
   return -1;
 }
@@ -507,7 +507,7 @@
     int id,
     PP_Instance instance,
     base::SharedMemoryHandle* handle,
-    uint32* size_in_bytes) {
+    uint32_t* size_in_bytes) {
   NOTREACHED();
   return false;
 }
diff --git a/ppapi/proxy/plugin_var_tracker.h b/ppapi/proxy/plugin_var_tracker.h
index 0318a4a..fa86657 100644
--- a/ppapi/proxy/plugin_var_tracker.h
+++ b/ppapi/proxy/plugin_var_tracker.h
@@ -8,8 +8,8 @@
 #include <map>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/shared_memory.h"
 #include "ppapi/c/pp_stdint.h"
@@ -70,11 +70,11 @@
   void DidDeleteInstance(PP_Instance instance) override;
   int TrackSharedMemoryHandle(PP_Instance instance,
                               base::SharedMemoryHandle file,
-                              uint32 size_in_bytes) override;
+                              uint32_t size_in_bytes) override;
   bool StopTrackingSharedMemoryHandle(int id,
                                       PP_Instance instance,
                                       base::SharedMemoryHandle* handle,
-                                      uint32* size_in_bytes) override;
+                                      uint32_t* size_in_bytes) override;
 
   // Notification that a plugin-implemented object (PPP_Class) was created by
   // the plugin or deallocated by WebKit over IPC.
@@ -99,13 +99,13 @@
 
  private:
   // VarTracker protected overrides.
-  int32 AddVarInternal(Var* var, AddVarRefMode mode) override;
+  int32_t AddVarInternal(Var* var, AddVarRefMode mode) override;
   void TrackedObjectGettingOneRef(VarMap::const_iterator iter) override;
   void ObjectGettingZeroRef(VarMap::iterator iter) override;
   bool DeleteObjectInfoIfNecessary(VarMap::iterator iter) override;
-  ArrayBufferVar* CreateArrayBuffer(uint32 size_in_bytes) override;
+  ArrayBufferVar* CreateArrayBuffer(uint32_t size_in_bytes) override;
   ArrayBufferVar* CreateShmArrayBuffer(
-      uint32 size_in_bytes,
+      uint32_t size_in_bytes,
       base::SharedMemoryHandle handle) override;
 
  private:
@@ -114,7 +114,7 @@
 
   // Represents a var as received from the host.
   struct HostVar {
-    HostVar(PluginDispatcher* d, int32 i);
+    HostVar(PluginDispatcher* d, int32_t i);
 
     bool operator<(const HostVar& other) const;
 
@@ -125,7 +125,7 @@
     // The object ID that the host generated to identify the object. This is
     // unique only within that host: different hosts could give us different
     // objects with the same ID.
-    int32 host_object_id;
+    int32_t host_object_id;
   };
 
   struct PluginImplementedVar {
@@ -151,7 +151,7 @@
     // that it implements that it previously released but got again through
     // indirect means would be extremely rare, and we only allow var scripting
     // in limited cases anyway.
-    int32 plugin_object_id;
+    int32_t plugin_object_id;
   };
 
   // Returns the existing var ID for the given object var, creating and
@@ -173,7 +173,7 @@
       PluginDispatcher* dispatcher);
 
   // Maps host vars in the host to IDs in the plugin process.
-  typedef std::map<HostVar, int32> HostVarToPluginVarMap;
+  typedef std::map<HostVar, int32_t> HostVarToPluginVarMap;
   HostVarToPluginVarMap host_var_to_plugin_var_;
 
   // Maps "user data" for plugin implemented objects (PPP_Class) that are
diff --git a/ppapi/proxy/plugin_var_tracker_unittest.cc b/ppapi/proxy/plugin_var_tracker_unittest.cc
index 51d5036..79c1247 100644
--- a/ppapi/proxy/plugin_var_tracker_unittest.cc
+++ b/ppapi/proxy/plugin_var_tracker_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "ipc/ipc_test_sink.h"
 #include "ppapi/c/dev/ppp_class_deprecated.h"
 #include "ppapi/proxy/plugin_var_tracker.h"
@@ -15,7 +17,7 @@
 
 namespace {
 
-PP_Var MakeObject(int32 object_id) {
+PP_Var MakeObject(int32_t object_id) {
   PP_Var ret;
   ret.type = PP_VARTYPE_OBJECT;
   ret.value.as_id = object_id;
@@ -50,13 +52,13 @@
  protected:
   // Asserts that there is a unique "release object" IPC message in the test
   // sink. This will return the var ID from the message or -1 if none found.
-  int32 GetObjectIDForUniqueReleaseObject() {
+  int32_t GetObjectIDForUniqueReleaseObject() {
     const IPC::Message* release_msg = sink().GetUniqueMessageMatching(
         PpapiHostMsg_PPBVar_ReleaseObject::ID);
     if (!release_msg)
       return -1;
 
-    base::Tuple<int64> id;
+    base::Tuple<int64_t> id;
     PpapiHostMsg_PPBVar_ReleaseObject::Read(release_msg, &id);
     return base::get<0>(id);
   }
diff --git a/ppapi/proxy/ppapi_command_buffer_proxy.cc b/ppapi/proxy/ppapi_command_buffer_proxy.cc
index 1ce6a53..ecf64da2 100644
--- a/ppapi/proxy/ppapi_command_buffer_proxy.cc
+++ b/ppapi/proxy/ppapi_command_buffer_proxy.cc
@@ -49,13 +49,13 @@
   return last_state_;
 }
 
-int32 PpapiCommandBufferProxy::GetLastToken() {
+int32_t PpapiCommandBufferProxy::GetLastToken() {
   ppapi::ProxyLock::AssertAcquiredDebugOnly();
   TryUpdateState();
   return last_state_.token;
 }
 
-void PpapiCommandBufferProxy::Flush(int32 put_offset) {
+void PpapiCommandBufferProxy::Flush(int32_t put_offset) {
   if (last_state_.error != gpu::error::kNoError)
     return;
 
@@ -63,7 +63,7 @@
   FlushInternal();
 }
 
-void PpapiCommandBufferProxy::OrderingBarrier(int32 put_offset) {
+void PpapiCommandBufferProxy::OrderingBarrier(int32_t put_offset) {
   if (last_state_.error != gpu::error::kNoError)
     return;
 
@@ -77,7 +77,7 @@
   pending_fence_sync_release_ = next_fence_sync_release_ - 1;
 }
 
-void PpapiCommandBufferProxy::WaitForTokenInRange(int32 start, int32 end) {
+void PpapiCommandBufferProxy::WaitForTokenInRange(int32_t start, int32_t end) {
   TryUpdateState();
   if (!InRange(start, end, last_state_.token) &&
       last_state_.error == gpu::error::kNoError) {
@@ -96,7 +96,8 @@
          last_state_.error != gpu::error::kNoError);
 }
 
-void PpapiCommandBufferProxy::WaitForGetOffsetInRange(int32 start, int32 end) {
+void PpapiCommandBufferProxy::WaitForGetOffsetInRange(int32_t start,
+                                                      int32_t end) {
   TryUpdateState();
   if (!InRange(start, end, last_state_.get_offset) &&
       last_state_.error == gpu::error::kNoError) {
@@ -115,7 +116,7 @@
          last_state_.error != gpu::error::kNoError);
 }
 
-void PpapiCommandBufferProxy::SetGetBuffer(int32 transfer_buffer_id) {
+void PpapiCommandBufferProxy::SetGetBuffer(int32_t transfer_buffer_id) {
   if (last_state_.error == gpu::error::kNoError) {
     Send(new PpapiHostMsg_PPBGraphics3D_SetGetBuffer(
          ppapi::API_ID_PPB_GRAPHICS_3D, resource_, transfer_buffer_id));
@@ -124,7 +125,7 @@
 
 scoped_refptr<gpu::Buffer> PpapiCommandBufferProxy::CreateTransferBuffer(
     size_t size,
-    int32* id) {
+    int32_t* id) {
   *id = -1;
 
   if (last_state_.error != gpu::error::kNoError)
@@ -165,7 +166,7 @@
                                          handle.size());
 }
 
-void PpapiCommandBufferProxy::DestroyTransferBuffer(int32 id) {
+void PpapiCommandBufferProxy::DestroyTransferBuffer(int32_t id) {
   if (last_state_.error != gpu::error::kNoError)
     return;
 
@@ -220,8 +221,8 @@
   return 0;
 }
 
-uint32 PpapiCommandBufferProxy::InsertSyncPoint() {
-  uint32 sync_point = 0;
+uint32_t PpapiCommandBufferProxy::InsertSyncPoint() {
+  uint32_t sync_point = 0;
   if (last_state_.error == gpu::error::kNoError) {
     Send(new PpapiHostMsg_PPBGraphics3D_InsertSyncPoint(
          ppapi::API_ID_PPB_GRAPHICS_3D, resource_, &sync_point));
@@ -229,8 +230,8 @@
   return sync_point;
 }
 
-uint32 PpapiCommandBufferProxy::InsertFutureSyncPoint() {
-  uint32 sync_point = 0;
+uint32_t PpapiCommandBufferProxy::InsertFutureSyncPoint() {
+  uint32_t sync_point = 0;
   if (last_state_.error == gpu::error::kNoError) {
     Send(new PpapiHostMsg_PPBGraphics3D_InsertFutureSyncPoint(
         ppapi::API_ID_PPB_GRAPHICS_3D, resource_, &sync_point));
@@ -238,19 +239,19 @@
   return sync_point;
 }
 
-void PpapiCommandBufferProxy::RetireSyncPoint(uint32 sync_point) {
+void PpapiCommandBufferProxy::RetireSyncPoint(uint32_t sync_point) {
   if (last_state_.error == gpu::error::kNoError) {
     Send(new PpapiHostMsg_PPBGraphics3D_RetireSyncPoint(
         ppapi::API_ID_PPB_GRAPHICS_3D, resource_, sync_point));
   }
 }
 
-void PpapiCommandBufferProxy::SignalSyncPoint(uint32 sync_point,
+void PpapiCommandBufferProxy::SignalSyncPoint(uint32_t sync_point,
                                               const base::Closure& callback) {
   NOTREACHED();
 }
 
-void PpapiCommandBufferProxy::SignalQuery(uint32 query,
+void PpapiCommandBufferProxy::SignalQuery(uint32_t query,
                                           const base::Closure& callback) {
   NOTREACHED();
 }
@@ -259,19 +260,19 @@
   return capabilities_;
 }
 
-int32 PpapiCommandBufferProxy::CreateImage(ClientBuffer buffer,
-                                           size_t width,
-                                           size_t height,
-                                           unsigned internalformat) {
+int32_t PpapiCommandBufferProxy::CreateImage(ClientBuffer buffer,
+                                             size_t width,
+                                             size_t height,
+                                             unsigned internalformat) {
   NOTREACHED();
   return -1;
 }
 
-void PpapiCommandBufferProxy::DestroyImage(int32 id) {
+void PpapiCommandBufferProxy::DestroyImage(int32_t id) {
   NOTREACHED();
 }
 
-int32 PpapiCommandBufferProxy::CreateGpuMemoryBufferImage(
+int32_t PpapiCommandBufferProxy::CreateGpuMemoryBufferImage(
     size_t width,
     size_t height,
     unsigned internalformat,
diff --git a/ppapi/proxy/ppapi_command_buffer_proxy.h b/ppapi/proxy/ppapi_command_buffer_proxy.h
index 0242d4c..e829191 100644
--- a/ppapi/proxy/ppapi_command_buffer_proxy.h
+++ b/ppapi/proxy/ppapi_command_buffer_proxy.h
@@ -5,8 +5,12 @@
 #ifndef PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_
 #define PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/callback.h"
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "gpu/command_buffer/client/gpu_control.h"
 #include "gpu/command_buffer/common/command_buffer.h"
@@ -37,33 +41,33 @@
   // gpu::CommandBuffer implementation:
   bool Initialize() override;
   State GetLastState() override;
-  int32 GetLastToken() override;
-  void Flush(int32 put_offset) override;
-  void OrderingBarrier(int32 put_offset) override;
-  void WaitForTokenInRange(int32 start, int32 end) override;
-  void WaitForGetOffsetInRange(int32 start, int32 end) override;
-  void SetGetBuffer(int32 transfer_buffer_id) override;
+  int32_t GetLastToken() override;
+  void Flush(int32_t put_offset) override;
+  void OrderingBarrier(int32_t put_offset) override;
+  void WaitForTokenInRange(int32_t start, int32_t end) override;
+  void WaitForGetOffsetInRange(int32_t start, int32_t end) override;
+  void SetGetBuffer(int32_t transfer_buffer_id) override;
   scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size,
-                                                  int32* id) override;
-  void DestroyTransferBuffer(int32 id) override;
+                                                  int32_t* id) override;
+  void DestroyTransferBuffer(int32_t id) override;
 
   // gpu::GpuControl implementation:
   gpu::Capabilities GetCapabilities() override;
-  int32 CreateImage(ClientBuffer buffer,
-                    size_t width,
-                    size_t height,
-                    unsigned internalformat) override;
-  void DestroyImage(int32 id) override;
-  int32 CreateGpuMemoryBufferImage(size_t width,
-                                   size_t height,
-                                   unsigned internalformat,
-                                   unsigned usage) override;
-  uint32 InsertSyncPoint() override;
-  uint32 InsertFutureSyncPoint() override;
-  void RetireSyncPoint(uint32 sync_point) override;
-  void SignalSyncPoint(uint32 sync_point,
+  int32_t CreateImage(ClientBuffer buffer,
+                      size_t width,
+                      size_t height,
+                      unsigned internalformat) override;
+  void DestroyImage(int32_t id) override;
+  int32_t CreateGpuMemoryBufferImage(size_t width,
+                                     size_t height,
+                                     unsigned internalformat,
+                                     unsigned usage) override;
+  uint32_t InsertSyncPoint() override;
+  uint32_t InsertFutureSyncPoint() override;
+  void RetireSyncPoint(uint32_t sync_point) override;
+  void SignalSyncPoint(uint32_t sync_point,
                        const base::Closure& callback) override;
-  void SignalQuery(uint32 query, const base::Closure& callback) override;
+  void SignalQuery(uint32_t query, const base::Closure& callback) override;
   void SetLock(base::Lock*) override;
   bool IsGpuChannelLost() override;
   gpu::CommandBufferNamespace GetNamespaceID() const override;
diff --git a/ppapi/proxy/ppapi_message_utils.h b/ppapi/proxy/ppapi_message_utils.h
index 6588a6e..fbcb105 100644
--- a/ppapi/proxy/ppapi_message_utils.h
+++ b/ppapi/proxy/ppapi_message_utils.h
@@ -5,7 +5,6 @@
 #ifndef PPAPI_PROXY_PPAPI_MESSAGE_UTILS_H_
 #define PPAPI_PROXY_PPAPI_MESSAGE_UTILS_H_
 
-#include "base/basictypes.h"
 #include "base/pickle.h"
 #include "base/tuple.h"
 #include "ipc/ipc_message.h"
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h
index c332a9d7..2a59a7a 100644
--- a/ppapi/proxy/ppapi_messages.h
+++ b/ppapi/proxy/ppapi_messages.h
@@ -3,16 +3,19 @@
 // found in the LICENSE file.
 
 // Multiply-included message header, no traditional include guard.
+
+#include <stdint.h>
+
 #include <map>
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/files/file_path.h"
 #include "base/memory/shared_memory.h"
 #include "base/process/process.h"
 #include "base/strings/string16.h"
 #include "base/sync_socket.h"
+#include "build/build_config.h"
 #include "gpu/command_buffer/common/command_buffer.h"
 #include "gpu/command_buffer/common/mailbox.h"
 #include "gpu/command_buffer/common/sync_token.h"
@@ -542,60 +545,60 @@
 // process will respond with PpapiHostMsg_GetSitesWithDataResult. This is used
 // for Flash.
 IPC_MESSAGE_CONTROL2(PpapiMsg_GetSitesWithData,
-                     uint32 /* request_id */,
+                     uint32_t /* request_id */,
                      base::FilePath /* plugin_data_path */)
 IPC_MESSAGE_CONTROL2(PpapiHostMsg_GetSitesWithDataResult,
-                     uint32 /* request_id */,
+                     uint32_t /* request_id */,
                      std::vector<std::string> /* sites */)
 
 // Instructs the plugin to clear data for the given site & time. The plugin
 // process will respond with PpapiHostMsg_ClearSiteDataResult. This is used
 // for Flash.
 IPC_MESSAGE_CONTROL5(PpapiMsg_ClearSiteData,
-                     uint32 /* request_id */,
+                     uint32_t /* request_id */,
                      base::FilePath /* plugin_data_path */,
                      std::string /* site */,
-                     uint64 /* flags */,
-                     uint64 /* max_age */)
+                     uint64_t /* flags */,
+                     uint64_t /* max_age */)
 IPC_MESSAGE_CONTROL2(PpapiHostMsg_ClearSiteDataResult,
-                     uint32 /* request_id */,
+                     uint32_t /* request_id */,
                      bool /* success */)
 
 IPC_MESSAGE_CONTROL2(PpapiMsg_DeauthorizeContentLicenses,
-                     uint32 /* request_id */,
+                     uint32_t /* request_id */,
                      base::FilePath /* plugin_data_path */)
 IPC_MESSAGE_CONTROL2(PpapiHostMsg_DeauthorizeContentLicensesResult,
-                     uint32 /* request_id */,
+                     uint32_t /* request_id */,
                      bool /* success */)
 
 IPC_MESSAGE_CONTROL3(PpapiMsg_GetPermissionSettings,
-                     uint32 /* request_id */,
+                     uint32_t /* request_id */,
                      base::FilePath /* plugin_data_path */,
                      PP_Flash_BrowserOperations_SettingType /* setting_type */)
 IPC_MESSAGE_CONTROL4(
     PpapiHostMsg_GetPermissionSettingsResult,
-    uint32 /* request_id */,
+    uint32_t /* request_id */,
     bool /* success */,
     PP_Flash_BrowserOperations_Permission /* default_permission */,
     ppapi::FlashSiteSettings /* sites */)
 
 IPC_MESSAGE_CONTROL5(PpapiMsg_SetDefaultPermission,
-                     uint32 /* request_id */,
+                     uint32_t /* request_id */,
                      base::FilePath /* plugin_data_path */,
                      PP_Flash_BrowserOperations_SettingType /* setting_type */,
                      PP_Flash_BrowserOperations_Permission /* permission */,
                      bool /* clear_site_specific */)
 IPC_MESSAGE_CONTROL2(PpapiHostMsg_SetDefaultPermissionResult,
-                     uint32 /* request_id */,
+                     uint32_t /* request_id */,
                      bool /* success */)
 
 IPC_MESSAGE_CONTROL4(PpapiMsg_SetSitePermission,
-                     uint32 /* request_id */,
+                     uint32_t /* request_id */,
                      base::FilePath /* plugin_data_path */,
                      PP_Flash_BrowserOperations_SettingType /* setting_type */,
                      ppapi::FlashSiteSettings /* sites */)
 IPC_MESSAGE_CONTROL2(PpapiHostMsg_SetSitePermissionResult,
-                     uint32 /* request_id */,
+                     uint32_t /* request_id */,
                      bool /* success */)
 
 // Broker Process.
@@ -636,55 +639,55 @@
 
 // PPP_Class.
 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasProperty,
-                           int64 /* ppp_class */,
-                           int64 /* object */,
+                           int64_t /* ppp_class */,
+                           int64_t /* object */,
                            ppapi::proxy::SerializedVar /* property */,
                            ppapi::proxy::SerializedVar /* out_exception */,
                            bool /* result */)
 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasMethod,
-                           int64 /* ppp_class */,
-                           int64 /* object */,
+                           int64_t /* ppp_class */,
+                           int64_t /* object */,
                            ppapi::proxy::SerializedVar /* method */,
                            ppapi::proxy::SerializedVar /* out_exception */,
                            bool /* result */)
 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_GetProperty,
-                           int64 /* ppp_class */,
-                           int64 /* object */,
+                           int64_t /* ppp_class */,
+                           int64_t /* object */,
                            ppapi::proxy::SerializedVar /* property */,
                            ppapi::proxy::SerializedVar /* out_exception */,
                            ppapi::proxy::SerializedVar /* result */)
 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiMsg_PPPClass_EnumerateProperties,
-                           int64 /* ppp_class */,
-                           int64 /* object */,
+                           int64_t /* ppp_class */,
+                           int64_t /* object */,
                            std::vector<ppapi::proxy::SerializedVar> /* props */,
                            ppapi::proxy::SerializedVar /* out_exception */)
 IPC_SYNC_MESSAGE_ROUTED4_1(PpapiMsg_PPPClass_SetProperty,
-                           int64 /* ppp_class */,
-                           int64 /* object */,
+                           int64_t /* ppp_class */,
+                           int64_t /* object */,
                            ppapi::proxy::SerializedVar /* name */,
                            ppapi::proxy::SerializedVar /* value */,
                            ppapi::proxy::SerializedVar /* out_exception */)
 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiMsg_PPPClass_RemoveProperty,
-                           int64 /* ppp_class */,
-                           int64 /* object */,
+                           int64_t /* ppp_class */,
+                           int64_t /* object */,
                            ppapi::proxy::SerializedVar /* property */,
                            ppapi::proxy::SerializedVar /* out_exception */)
 IPC_SYNC_MESSAGE_ROUTED4_2(PpapiMsg_PPPClass_Call,
-                           int64 /* ppp_class */,
-                           int64 /* object */,
+                           int64_t /* ppp_class */,
+                           int64_t /* object */,
                            ppapi::proxy::SerializedVar /* method_name */,
                            std::vector<ppapi::proxy::SerializedVar> /* args */,
                            ppapi::proxy::SerializedVar /* out_exception */,
                            ppapi::proxy::SerializedVar /* result */)
 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_Construct,
-                           int64 /* ppp_class */,
-                           int64 /* object */,
+                           int64_t /* ppp_class */,
+                           int64_t /* object */,
                            std::vector<ppapi::proxy::SerializedVar> /* args */,
                            ppapi::proxy::SerializedVar /* out_exception */,
                            ppapi::proxy::SerializedVar /* result */)
 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPClass_Deallocate,
-                    int64 /* ppp_class */,
-                    int64 /* object */)
+                    int64_t /* ppp_class */,
+                    int64_t /* object */)
 
 // PPP_Graphics3D_Dev.
 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPGraphics3D_ContextLost,
@@ -964,46 +967,46 @@
                            uint64_t /* command_buffer_id */)
 IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_SetGetBuffer,
                            ppapi::HostResource /* context */,
-                           int32 /* transfer_buffer_id */)
+                           int32_t /* transfer_buffer_id */)
 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBGraphics3D_WaitForTokenInRange,
                            ppapi::HostResource /* context */,
-                           int32 /* start */,
-                           int32 /* end */,
+                           int32_t /* start */,
+                           int32_t /* end */,
                            gpu::CommandBuffer::State /* state */,
                            bool /* success */)
 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBGraphics3D_WaitForGetOffsetInRange,
                            ppapi::HostResource /* context */,
-                           int32 /* start */,
-                           int32 /* end */,
+                           int32_t /* start */,
+                           int32_t /* end */,
                            gpu::CommandBuffer::State /* state */,
                            bool /* success */)
 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics3D_AsyncFlush,
                     ppapi::HostResource /* context */,
-                    int32 /* put_offset */)
+                    int32_t /* put_offset */)
 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBGraphics3D_CreateTransferBuffer,
                            ppapi::HostResource /* context */,
-                           uint32 /* size */,
-                           int32 /* id */,
+                           uint32_t /* size */,
+                           int32_t /* id */,
                            ppapi::proxy::SerializedHandle /* transfer_buffer */)
 IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_DestroyTransferBuffer,
                            ppapi::HostResource /* context */,
-                           int32 /* id */)
+                           int32_t /* id */)
 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBGraphics3D_SwapBuffers,
                     ppapi::HostResource /* graphics_3d */)
 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBGraphics3D_InsertSyncPoint,
                            ppapi::HostResource /* context */,
-                           uint32 /* sync_point */)
+                           uint32_t /* sync_point */)
 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBGraphics3D_InsertFutureSyncPoint,
                            ppapi::HostResource /* context */,
-                           uint32 /* sync_point */)
+                           uint32_t /* sync_point */)
 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics3D_RetireSyncPoint,
                     ppapi::HostResource /* context */,
-                    uint32 /* sync_point */)
+                    uint32_t /* sync_point */)
 
 // PPB_ImageData.
 IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_CreatePlatform,
                            PP_Instance /* instance */,
-                           int32 /* format */,
+                           int32_t /* format */,
                            PP_Size /* size */,
                            PP_Bool /* init_to_zero */,
                            ppapi::HostResource /* result_resource */,
@@ -1011,7 +1014,7 @@
                            ppapi::proxy::ImageHandle /* result */)
 IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_CreateSimple,
                            PP_Instance /* instance */,
-                           int32 /* format */,
+                           int32_t /* format */,
                            PP_Size /* size */,
                            PP_Bool /* init_to_zero */,
                            ppapi::HostResource /* result_resource */,
@@ -1113,9 +1116,8 @@
 
 // PPB_Var.
 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBVar_AddRefObject,
-                           int64 /* object_id */)
-IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_ReleaseObject,
-                    int64 /* object_id */)
+                           int64_t /* object_id */)
+IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_ReleaseObject, int64_t /* object_id */)
 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasProperty,
                            ppapi::proxy::SerializedVar /* object */,
                            ppapi::proxy::SerializedVar /* property */,
@@ -1158,13 +1160,13 @@
                            ppapi::proxy::SerializedVar /* result */)
 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_IsInstanceOfDeprecated,
                            ppapi::proxy::SerializedVar /* var */,
-                           int64 /* object_class */,
-                           int64 /* object-data */,
+                           int64_t /* object_class */,
+                           int64_t /* object-data */,
                            PP_Bool /* result */)
 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_CreateObjectDeprecated,
                            PP_Instance /* instance */,
-                           int64 /* object_class */,
-                           int64 /* object_data */,
+                           int64_t /* object_class */,
+                           int64_t /* object_data */,
                            ppapi::proxy::SerializedVar /* result */)
 
 #if !defined(OS_NACL) && !defined(NACL_WIN64)
@@ -1257,7 +1259,7 @@
     PP_Bool /* result */)
 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance,
                            PP_Instance /* instance */,
-                           uint32 /* result */)
+                           uint32_t /* result */)
 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBTesting_PostPowerSaverStatus,
                            PP_Instance /* instance */)
 IPC_SYNC_MESSAGE_ROUTED1_0(
@@ -1282,8 +1284,8 @@
 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBVideoDecoder_Decode,
                     ppapi::HostResource /* video_decoder */,
                     ppapi::HostResource /* bitstream buffer */,
-                    int32 /* bitstream buffer id */,
-                    uint32 /* size of buffer */)
+                    int32_t /* bitstream buffer id */,
+                    uint32_t /* size of buffer */)
 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers,
                     ppapi::HostResource /* video_decoder */,
                     std::vector<PP_PictureBuffer_Dev> /* picture buffers */)
diff --git a/ppapi/proxy/ppapi_param_traits.cc b/ppapi/proxy/ppapi_param_traits.cc
index 2b6a826..57f8a9f 100644
--- a/ppapi/proxy/ppapi_param_traits.cc
+++ b/ppapi/proxy/ppapi_param_traits.cc
@@ -4,12 +4,16 @@
 
 #include "ppapi/proxy/ppapi_param_traits.h"
 
+#include <stddef.h>
+#include <stdint.h>
 #include <string.h>  // For memcpy
 
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "ppapi/c/pp_resource.h"
 #include "ppapi/proxy/ppapi_messages.h"
-#include "ppapi/proxy/serialized_var.h"
 #include "ppapi/proxy/serialized_flash_menu.h"
+#include "ppapi/proxy/serialized_var.h"
 #include "ppapi/shared_impl/host_resource.h"
 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h"
 
@@ -156,7 +160,7 @@
 bool ParamTraits<PP_NetAddress_Private>::Read(const Message* m,
                                               base::PickleIterator* iter,
                                               param_type* p) {
-  uint16 size;
+  uint16_t size;
   if (!ReadParam(m, iter, &size))
     return false;
   if (size > sizeof(p->data))
diff --git a/ppapi/proxy/ppapi_param_traits.h b/ppapi/proxy/ppapi_param_traits.h
index 6aff5745..e3638b8 100644
--- a/ppapi/proxy/ppapi_param_traits.h
+++ b/ppapi/proxy/ppapi_param_traits.h
@@ -8,6 +8,7 @@
 #include <string>
 #include <vector>
 
+#include "build/build_config.h"
 #include "ipc/ipc_message_utils.h"
 #include "ipc/ipc_platform_file.h"
 #include "ppapi/c/pp_completion_callback.h"
diff --git a/ppapi/proxy/ppapi_proxy_test.cc b/ppapi/proxy/ppapi_proxy_test.cc
index bd76918..f3fb9ddc1 100644
--- a/ppapi/proxy/ppapi_proxy_test.cc
+++ b/ppapi/proxy/ppapi_proxy_test.cc
@@ -270,14 +270,13 @@
   return &instance_id_set_;
 }
 
-uint32 PluginProxyTestHarness::PluginDelegateMock::Register(
+uint32_t PluginProxyTestHarness::PluginDelegateMock::Register(
     PluginDispatcher* plugin_dispatcher) {
   return 0;
 }
 
 void PluginProxyTestHarness::PluginDelegateMock::Unregister(
-    uint32 plugin_dispatcher_id) {
-}
+    uint32_t plugin_dispatcher_id) {}
 
 IPC::Sender* PluginProxyTestHarness::PluginDelegateMock::GetBrowserSender() {
   return browser_sender_;
diff --git a/ppapi/proxy/ppapi_proxy_test.h b/ppapi/proxy/ppapi_proxy_test.h
index 897410da..ec99071 100644
--- a/ppapi/proxy/ppapi_proxy_test.h
+++ b/ppapi/proxy/ppapi_proxy_test.h
@@ -2,10 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/synchronization/waitable_event.h"
@@ -146,8 +149,8 @@
 
     // PluginDispatcher::PluginDelegate implementation.
     std::set<PP_Instance>* GetGloballySeenInstanceIDSet() override;
-    uint32 Register(PluginDispatcher* plugin_dispatcher) override;
-    void Unregister(uint32 plugin_dispatcher_id) override;
+    uint32_t Register(PluginDispatcher* plugin_dispatcher) override;
+    void Unregister(uint32_t plugin_dispatcher_id) override;
 
     // PluginProxyDelegate implementation.
     IPC::Sender* GetBrowserSender() override;
diff --git a/ppapi/proxy/ppb_audio_proxy.cc b/ppapi/proxy/ppb_audio_proxy.cc
index daa0395d..ed60aa1 100644
--- a/ppapi/proxy/ppb_audio_proxy.cc
+++ b/ppapi/proxy/ppb_audio_proxy.cc
@@ -5,7 +5,9 @@
 #include "ppapi/proxy/ppb_audio_proxy.h"
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/threading/simple_thread.h"
+#include "build/build_config.h"
 #include "ppapi/c/pp_errors.h"
 #include "ppapi/c/ppb_audio.h"
 #include "ppapi/c/ppb_audio_config.h"
@@ -18,8 +20,8 @@
 #include "ppapi/shared_impl/ppapi_globals.h"
 #include "ppapi/shared_impl/ppb_audio_shared.h"
 #include "ppapi/shared_impl/resource.h"
-#include "ppapi/thunk/ppb_audio_config_api.h"
 #include "ppapi/thunk/enter.h"
+#include "ppapi/thunk/ppb_audio_config_api.h"
 #include "ppapi/thunk/resource_creation_api.h"
 #include "ppapi/thunk/thunk.h"
 
diff --git a/ppapi/proxy/ppb_audio_proxy.h b/ppapi/proxy/ppb_audio_proxy.h
index cc8af6c..a738104a 100644
--- a/ppapi/proxy/ppb_audio_proxy.h
+++ b/ppapi/proxy/ppb_audio_proxy.h
@@ -5,9 +5,11 @@
 #ifndef PPAPI_PROXY_PPB_AUDIO_PROXY_H_
 #define PPAPI_PROXY_PPB_AUDIO_PROXY_H_
 
+#include <stdint.h>
+
 #include <utility>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/shared_memory.h"
 #include "base/sync_socket.h"
 #include "ipc/ipc_platform_file.h"
diff --git a/ppapi/proxy/ppb_broker_proxy.cc b/ppapi/proxy/ppb_broker_proxy.cc
index e1d38ea..3f2b617 100644
--- a/ppapi/proxy/ppb_broker_proxy.cc
+++ b/ppapi/proxy/ppb_broker_proxy.cc
@@ -5,6 +5,7 @@
 #include "ppapi/proxy/ppb_broker_proxy.h"
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "ppapi/c/pp_errors.h"
 #include "ppapi/c/trusted/ppb_broker_trusted.h"
 #include "ppapi/proxy/enter_proxy.h"
@@ -12,8 +13,8 @@
 #include "ppapi/proxy/ppapi_messages.h"
 #include "ppapi/shared_impl/platform_file.h"
 #include "ppapi/shared_impl/tracked_callback.h"
-#include "ppapi/thunk/ppb_broker_api.h"
 #include "ppapi/thunk/enter.h"
+#include "ppapi/thunk/ppb_broker_api.h"
 #include "ppapi/thunk/resource_creation_api.h"
 #include "ppapi/thunk/thunk.h"
 
diff --git a/ppapi/proxy/ppb_broker_proxy.h b/ppapi/proxy/ppb_broker_proxy.h
index 5bc195a..7baf3a2 100644
--- a/ppapi/proxy/ppb_broker_proxy.h
+++ b/ppapi/proxy/ppb_broker_proxy.h
@@ -5,6 +5,8 @@
 #ifndef PPAPI_PROXY_PPB_BROKER_PROXY_H_
 #define PPAPI_PROXY_PPB_BROKER_PROXY_H_
 
+#include <stdint.h>
+
 #include "base/sync_socket.h"
 #include "ipc/ipc_platform_file.h"
 #include "ppapi/c/pp_instance.h"
diff --git a/ppapi/proxy/ppb_buffer_proxy.h b/ppapi/proxy/ppb_buffer_proxy.h
index 2c131a0..b3ba248 100644
--- a/ppapi/proxy/ppb_buffer_proxy.h
+++ b/ppapi/proxy/ppb_buffer_proxy.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_PPB_BUFFER_PROXY_H_
 #define PPAPI_PROXY_PPB_BUFFER_PROXY_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/shared_memory.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/proxy/interface_proxy.h"
diff --git a/ppapi/proxy/ppb_core_proxy.cc b/ppapi/proxy/ppb_core_proxy.cc
index 0cf2a95e..b3651ab 100644
--- a/ppapi/proxy/ppb_core_proxy.cc
+++ b/ppapi/proxy/ppb_core_proxy.cc
@@ -4,12 +4,14 @@
 
 #include "ppapi/proxy/ppb_core_proxy.h"
 
+#include <stdint.h>
 #include <stdlib.h>  // For malloc
 
 #include "base/bind.h"
 #include "base/logging.h"
 #include "base/time/time.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "ppapi/c/pp_completion_callback.h"
 #include "ppapi/c/pp_resource.h"
 #include "ppapi/c/ppb_core.h"
diff --git a/ppapi/proxy/ppb_flash_message_loop_proxy.cc b/ppapi/proxy/ppb_flash_message_loop_proxy.cc
index 1b332185..24d990e 100644
--- a/ppapi/proxy/ppb_flash_message_loop_proxy.cc
+++ b/ppapi/proxy/ppb_flash_message_loop_proxy.cc
@@ -5,6 +5,7 @@
 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h"
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "ppapi/c/pp_errors.h"
 #include "ppapi/c/private/ppb_flash_message_loop.h"
 #include "ppapi/proxy/enter_proxy.h"
diff --git a/ppapi/proxy/ppb_flash_message_loop_proxy.h b/ppapi/proxy/ppb_flash_message_loop_proxy.h
index a28bbda..9f0a3f9 100644
--- a/ppapi/proxy/ppb_flash_message_loop_proxy.h
+++ b/ppapi/proxy/ppb_flash_message_loop_proxy.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_
 #define PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "ppapi/c/pp_instance.h"
diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc
index 81b6a70..06db5afb 100644
--- a/ppapi/proxy/ppb_graphics_3d_proxy.cc
+++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc
@@ -5,6 +5,7 @@
 #include "ppapi/proxy/ppb_graphics_3d_proxy.h"
 
 #include "base/numerics/safe_conversions.h"
+#include "build/build_config.h"
 #include "gpu/command_buffer/client/gles2_implementation.h"
 #include "gpu/command_buffer/common/command_buffer.h"
 #include "ppapi/c/pp_errors.h"
@@ -26,8 +27,8 @@
 
 namespace {
 
-const int32 kCommandBufferSize = 1024 * 1024;
-const int32 kTransferBufferSize = 1024 * 1024;
+const int32_t kCommandBufferSize = 1024 * 1024;
+const int32_t kTransferBufferSize = 1024 * 1024;
 
 #if !defined(OS_NACL)
 base::SharedMemoryHandle TransportSHMHandle(
@@ -121,7 +122,7 @@
   return command_buffer_.get();
 }
 
-int32 Graphics3D::DoSwapBuffers() {
+int32_t Graphics3D::DoSwapBuffers() {
   gles2_impl()->SwapBuffers();
   IPC::Message* msg = new PpapiHostMsg_PPBGraphics3D_SwapBuffers(
       API_ID_PPB_GRAPHICS_3D, host_resource());
@@ -228,14 +229,13 @@
 }
 
 #if !defined(OS_NACL)
-void PPB_Graphics3D_Proxy::OnMsgCreate(
-    PP_Instance instance,
-    HostResource share_context,
-    const std::vector<int32_t>& attribs,
-    HostResource* result,
-    gpu::Capabilities* capabilities,
-    SerializedHandle* shared_state,
-    uint64* command_buffer_id) {
+void PPB_Graphics3D_Proxy::OnMsgCreate(PP_Instance instance,
+                                       HostResource share_context,
+                                       const std::vector<int32_t>& attribs,
+                                       HostResource* result,
+                                       gpu::Capabilities* capabilities,
+                                       SerializedHandle* shared_state,
+                                       uint64_t* command_buffer_id) {
   shared_state->set_null_shmem();
   if (attribs.empty() ||
       attribs.back() != PP_GRAPHICS3DATTRIB_NONE ||
@@ -262,9 +262,8 @@
   }
 }
 
-void PPB_Graphics3D_Proxy::OnMsgSetGetBuffer(
-    const HostResource& context,
-    int32 transfer_buffer_id) {
+void PPB_Graphics3D_Proxy::OnMsgSetGetBuffer(const HostResource& context,
+                                             int32_t transfer_buffer_id) {
   EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
   if (enter.succeeded())
     enter.object()->SetGetBuffer(transfer_buffer_id);
@@ -272,8 +271,8 @@
 
 void PPB_Graphics3D_Proxy::OnMsgWaitForTokenInRange(
     const HostResource& context,
-    int32 start,
-    int32 end,
+    int32_t start,
+    int32_t end,
     gpu::CommandBuffer::State* state,
     bool* success) {
   EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
@@ -287,8 +286,8 @@
 
 void PPB_Graphics3D_Proxy::OnMsgWaitForGetOffsetInRange(
     const HostResource& context,
-    int32 start,
-    int32 end,
+    int32_t start,
+    int32_t end,
     gpu::CommandBuffer::State* state,
     bool* success) {
   EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
@@ -301,7 +300,7 @@
 }
 
 void PPB_Graphics3D_Proxy::OnMsgAsyncFlush(const HostResource& context,
-                                           int32 put_offset) {
+                                           int32_t put_offset) {
   EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
   if (enter.succeeded())
     enter.object()->Flush(put_offset);
@@ -309,8 +308,8 @@
 
 void PPB_Graphics3D_Proxy::OnMsgCreateTransferBuffer(
     const HostResource& context,
-    uint32 size,
-    int32* id,
+    uint32_t size,
+    int32_t* id,
     SerializedHandle* transfer_buffer) {
   transfer_buffer->set_null_shmem();
   EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
@@ -332,7 +331,7 @@
 
 void PPB_Graphics3D_Proxy::OnMsgDestroyTransferBuffer(
     const HostResource& context,
-    int32 id) {
+    int32_t id) {
   EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
   if (enter.succeeded())
     enter.object()->DestroyTransferBuffer(id);
@@ -347,7 +346,7 @@
 }
 
 void PPB_Graphics3D_Proxy::OnMsgInsertSyncPoint(const HostResource& context,
-                                                uint32* sync_point) {
+                                                uint32_t* sync_point) {
   *sync_point = 0;
   EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
   if (enter.succeeded())
@@ -356,7 +355,7 @@
 
 void PPB_Graphics3D_Proxy::OnMsgInsertFutureSyncPoint(
     const HostResource& context,
-    uint32* sync_point) {
+    uint32_t* sync_point) {
   *sync_point = 0;
   EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
   if (enter.succeeded())
@@ -364,7 +363,7 @@
 }
 
 void PPB_Graphics3D_Proxy::OnMsgRetireSyncPoint(const HostResource& context,
-                                                uint32 sync_point) {
+                                                uint32_t sync_point) {
   EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
   if (enter.succeeded())
     enter.object()->RetireSyncPoint(sync_point);
diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.h b/ppapi/proxy/ppb_graphics_3d_proxy.h
index 6beed42..acbaa81 100644
--- a/ppapi/proxy/ppb_graphics_3d_proxy.h
+++ b/ppapi/proxy/ppb_graphics_3d_proxy.h
@@ -5,8 +5,11 @@
 #ifndef PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
 
+#include <stdint.h>
+
 #include <vector>
 
+#include "base/macros.h"
 #include "gpu/command_buffer/common/command_buffer.h"
 #include "ppapi/c/pp_graphics_3d.h"
 #include "ppapi/c/pp_instance.h"
@@ -44,7 +47,7 @@
   PP_Bool SetGetBuffer(int32_t shm_id) override;
   PP_Bool Flush(int32_t put_offset) override;
   scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size,
-                                                  int32* id) override;
+                                                  int32_t* id) override;
   PP_Bool DestroyTransferBuffer(int32_t id) override;
   gpu::CommandBuffer::State WaitForTokenInRange(int32_t start,
                                                 int32_t end) override;
@@ -58,7 +61,7 @@
   // PPB_Graphics3D_Shared overrides.
   gpu::CommandBuffer* GetCommandBuffer() override;
   gpu::GpuControl* GetGpuControl() override;
-  int32 DoSwapBuffers() override;
+  int32_t DoSwapBuffers() override;
 
   scoped_ptr<PpapiCommandBufferProxy> command_buffer_;
 
@@ -88,31 +91,29 @@
                    gpu::Capabilities* capabilities,
                    SerializedHandle* handle,
                    uint64_t* command_buffer_id);
-  void OnMsgSetGetBuffer(const HostResource& context,
-                         int32 id);
+  void OnMsgSetGetBuffer(const HostResource& context, int32_t id);
   void OnMsgWaitForTokenInRange(const HostResource& context,
-                                int32 start,
-                                int32 end,
+                                int32_t start,
+                                int32_t end,
                                 gpu::CommandBuffer::State* state,
                                 bool* success);
   void OnMsgWaitForGetOffsetInRange(const HostResource& context,
-                                    int32 start,
-                                    int32 end,
+                                    int32_t start,
+                                    int32_t end,
                                     gpu::CommandBuffer::State* state,
                                     bool* success);
-  void OnMsgAsyncFlush(const HostResource& context, int32 put_offset);
+  void OnMsgAsyncFlush(const HostResource& context, int32_t put_offset);
   void OnMsgCreateTransferBuffer(
       const HostResource& context,
-      uint32 size,
-      int32* id,
+      uint32_t size,
+      int32_t* id,
       ppapi::proxy::SerializedHandle* transfer_buffer);
-  void OnMsgDestroyTransferBuffer(const HostResource& context,
-                                  int32 id);
+  void OnMsgDestroyTransferBuffer(const HostResource& context, int32_t id);
   void OnMsgSwapBuffers(const HostResource& context);
-  void OnMsgInsertSyncPoint(const HostResource& context, uint32* sync_point);
+  void OnMsgInsertSyncPoint(const HostResource& context, uint32_t* sync_point);
   void OnMsgInsertFutureSyncPoint(const HostResource& context,
-                                  uint32* sync_point);
-  void OnMsgRetireSyncPoint(const HostResource& context, uint32 sync_point);
+                                  uint32_t* sync_point);
+  void OnMsgRetireSyncPoint(const HostResource& context, uint32_t sync_point);
   // Renderer->plugin message handlers.
   void OnMsgSwapBuffersACK(const HostResource& context,
                            int32_t pp_error);
diff --git a/ppapi/proxy/ppb_image_data_proxy.cc b/ppapi/proxy/ppb_image_data_proxy.cc
index ead31cb..3e286298 100644
--- a/ppapi/proxy/ppb_image_data_proxy.cc
+++ b/ppapi/proxy/ppb_image_data_proxy.cc
@@ -10,6 +10,7 @@
 #include <vector>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "base/memory/weak_ptr.h"
 #include "build/build_config.h"
diff --git a/ppapi/proxy/ppb_image_data_proxy.h b/ppapi/proxy/ppb_image_data_proxy.h
index 47dccc4e..38fc1097 100644
--- a/ppapi/proxy/ppb_image_data_proxy.h
+++ b/ppapi/proxy/ppb_image_data_proxy.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PPB_IMAGE_DATA_PROXY_H_
 #define PPAPI_PPB_IMAGE_DATA_PROXY_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "build/build_config.h"
@@ -121,7 +124,7 @@
 
  private:
   base::SharedMemory shm_;
-  uint32 size_;
+  uint32_t size_;
   int map_count_;
 
   DISALLOW_COPY_AND_ASSIGN(SimpleImageData);
diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
index 4506953..63372cb 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -546,13 +546,13 @@
 }
 
 void PPB_Instance_Proxy::PromiseResolved(PP_Instance instance,
-                                         uint32 promise_id) {
+                                         uint32_t promise_id) {
   dispatcher()->Send(new PpapiHostMsg_PPBInstance_PromiseResolved(
       API_ID_PPB_INSTANCE, instance, promise_id));
 }
 
 void PPB_Instance_Proxy::PromiseResolvedWithSession(PP_Instance instance,
-                                                    uint32 promise_id,
+                                                    uint32_t promise_id,
                                                     PP_Var session_id_var) {
   dispatcher()->Send(new PpapiHostMsg_PPBInstance_PromiseResolvedWithSession(
       API_ID_PPB_INSTANCE, instance, promise_id,
@@ -560,9 +560,9 @@
 }
 
 void PPB_Instance_Proxy::PromiseRejected(PP_Instance instance,
-                                         uint32 promise_id,
+                                         uint32_t promise_id,
                                          PP_CdmExceptionCode exception_code,
-                                         uint32 system_code,
+                                         uint32_t system_code,
                                          PP_Var error_description_var) {
   dispatcher()->Send(new PpapiHostMsg_PPBInstance_PromiseRejected(
       API_ID_PPB_INSTANCE,
@@ -634,7 +634,7 @@
 void PPB_Instance_Proxy::LegacySessionError(PP_Instance instance,
                                             PP_Var session_id_var,
                                             PP_CdmExceptionCode exception_code,
-                                            uint32 system_code,
+                                            uint32_t system_code,
                                             PP_Var error_description_var) {
   dispatcher()->Send(new PpapiHostMsg_PPBInstance_LegacySessionError(
       API_ID_PPB_INSTANCE, instance,
diff --git a/ppapi/proxy/ppb_instance_proxy.h b/ppapi/proxy/ppb_instance_proxy.h
index aac53b4..d568ed2 100644
--- a/ppapi/proxy/ppb_instance_proxy.h
+++ b/ppapi/proxy/ppb_instance_proxy.h
@@ -5,9 +5,12 @@
 #ifndef PPAPI_PROXY_PPB_INSTANCE_PROXY_H_
 #define PPAPI_PROXY_PPB_INSTANCE_PROXY_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
+#include "build/build_config.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/pp_resource.h"
 #include "ppapi/c/pp_var.h"
@@ -111,14 +114,14 @@
                               PP_URLComponents_Dev* components) override;
   PP_Var GetPluginReferrerURL(PP_Instance instance,
                               PP_URLComponents_Dev* components) override;
-  void PromiseResolved(PP_Instance instance, uint32 promise_id) override;
+  void PromiseResolved(PP_Instance instance, uint32_t promise_id) override;
   void PromiseResolvedWithSession(PP_Instance instance,
-                                  uint32 promise_id,
+                                  uint32_t promise_id,
                                   PP_Var session_id_var) override;
   void PromiseRejected(PP_Instance instance,
-                       uint32 promise_id,
+                       uint32_t promise_id,
                        PP_CdmExceptionCode exception_code,
-                       uint32 system_code,
+                       uint32_t system_code,
                        PP_Var error_description_var) override;
   void SessionMessage(PP_Instance instance,
                       PP_Var session_id_var,
@@ -138,7 +141,7 @@
   void LegacySessionError(PP_Instance instance,
                           PP_Var session_id_var,
                           PP_CdmExceptionCode exception_code,
-                          uint32 system_code,
+                          uint32_t system_code,
                           PP_Var error_description_var) override;
   void DeliverBlock(PP_Instance instance,
                     PP_Resource decrypted_block,
diff --git a/ppapi/proxy/ppb_message_loop_proxy.cc b/ppapi/proxy/ppb_message_loop_proxy.cc
index c9ea5a80..e05ec5c 100644
--- a/ppapi/proxy/ppb_message_loop_proxy.cc
+++ b/ppapi/proxy/ppb_message_loop_proxy.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/ppb_message_loop_proxy.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/bind.h"
@@ -178,7 +180,7 @@
 void MessageLoopResource::PostClosure(
     const tracked_objects::Location& from_here,
     const base::Closure& closure,
-    int64 delay_ms) {
+    int64_t delay_ms) {
   if (task_runner_.get()) {
     task_runner_->PostDelayedTask(from_here, closure,
                                   base::TimeDelta::FromMilliseconds(delay_ms));
diff --git a/ppapi/proxy/ppb_message_loop_proxy.h b/ppapi/proxy/ppb_message_loop_proxy.h
index 25e69b31..e8213a9 100644
--- a/ppapi/proxy/ppb_message_loop_proxy.h
+++ b/ppapi/proxy/ppb_message_loop_proxy.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PROXY_PPB_MESSAGE_LOOP_PROXY_H_
 #define PPAPI_PROXY_PPB_MESSAGE_LOOP_PROXY_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
@@ -56,7 +58,7 @@
   struct TaskInfo {
     tracked_objects::Location from_here;
     base::Closure closure;
-    int64 delay_ms;
+    int64_t delay_ms;
   };
 
   // Returns true if the object is associated with the current thread.
@@ -71,7 +73,7 @@
   //       proxy operations (e.g., MessageLoop::QuitClosure).
   void PostClosure(const tracked_objects::Location& from_here,
                    const base::Closure& closure,
-                   int64 delay_ms) override;
+                   int64_t delay_ms) override;
   base::SingleThreadTaskRunner* GetTaskRunner() override;
   bool CurrentlyHandlingBlockingMessage() override;
 
diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc
index 4381798..6ddbd7e 100644
--- a/ppapi/proxy/ppb_testing_proxy.cc
+++ b/ppapi/proxy/ppb_testing_proxy.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/ppb_testing_proxy.h"
 
+#include <stddef.h>
+
 #include "base/message_loop/message_loop.h"
 #include "ppapi/c/private/ppb_testing_private.h"
 #include "ppapi/proxy/enter_proxy.h"
diff --git a/ppapi/proxy/ppb_testing_proxy.h b/ppapi/proxy/ppb_testing_proxy.h
index 7640291..c4b149ac 100644
--- a/ppapi/proxy/ppb_testing_proxy.h
+++ b/ppapi/proxy/ppb_testing_proxy.h
@@ -5,7 +5,9 @@
 #ifndef PPAPI_PROXY_PPB_TESTING_PROXY_H_
 #define PPAPI_PROXY_PPB_TESTING_PROXY_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/pp_resource.h"
 #include "ppapi/c/private/ppb_testing_private.h"
diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.cc b/ppapi/proxy/ppb_var_deprecated_proxy.cc
index 7adda60..dd4bb4c2 100644
--- a/ppapi/proxy/ppb_var_deprecated_proxy.cc
+++ b/ppapi/proxy/ppb_var_deprecated_proxy.cc
@@ -238,8 +238,9 @@
     return false;
 
   PP_Bool result = PP_FALSE;
-  int64 class_int = static_cast<int64>(reinterpret_cast<intptr_t>(ppp_class));
-  int64 class_data_int = 0;
+  int64_t class_int =
+      static_cast<int64_t>(reinterpret_cast<intptr_t>(ppp_class));
+  int64_t class_data_int = 0;
   dispatcher->Send(new PpapiHostMsg_PPBVar_IsInstanceOfDeprecated(
       API_ID_PPB_VAR_DEPRECATED, SerializedVarSendInput(dispatcher, var),
       class_int, &class_data_int, &result));
@@ -261,9 +262,10 @@
     return PP_MakeUndefined();  // Object already exists with this user data.
 
   ReceiveSerializedVarReturnValue result;
-  int64 class_int = static_cast<int64>(reinterpret_cast<intptr_t>(ppp_class));
-  int64 data_int =
-      static_cast<int64>(reinterpret_cast<intptr_t>(ppp_class_data));
+  int64_t class_int =
+      static_cast<int64_t>(reinterpret_cast<intptr_t>(ppp_class));
+  int64_t data_int =
+      static_cast<int64_t>(reinterpret_cast<intptr_t>(ppp_class_data));
   dispatcher->Send(new PpapiHostMsg_PPBVar_CreateObjectDeprecated(
       API_ID_PPB_VAR_DEPRECATED, instance, class_int, data_int,
       &result));
@@ -355,13 +357,13 @@
   return handled;
 }
 
-void PPB_Var_Deprecated_Proxy::OnMsgAddRefObject(int64 object_id) {
+void PPB_Var_Deprecated_Proxy::OnMsgAddRefObject(int64_t object_id) {
   PP_Var var = { PP_VARTYPE_OBJECT };
   var.value.as_id = object_id;
   ppb_var_impl_->AddRef(var);
 }
 
-void PPB_Var_Deprecated_Proxy::OnMsgReleaseObject(int64 object_id) {
+void PPB_Var_Deprecated_Proxy::OnMsgReleaseObject(int64_t object_id) {
   // Ok, so this is super subtle.
   // When the browser side sends a sync IPC message that returns a var, and the
   // plugin wants to give ownership of that var to the browser, dropping all
@@ -489,8 +491,8 @@
 
 void PPB_Var_Deprecated_Proxy::OnMsgIsInstanceOfDeprecated(
     SerializedVarReceiveInput var,
-    int64 ppp_class,
-    int64* ppp_class_data,
+    int64_t ppp_class,
+    int64_t* ppp_class_data,
     PP_Bool* result) {
   SetAllowPluginReentrancy();
   *result = PPP_Class_Proxy::IsInstanceOf(ppb_var_impl_,
@@ -501,8 +503,8 @@
 
 void PPB_Var_Deprecated_Proxy::OnMsgCreateObjectDeprecated(
     PP_Instance instance,
-    int64 ppp_class,
-    int64 class_data,
+    int64_t ppp_class,
+    int64_t class_data,
     SerializedVarReturnValue result) {
   SetAllowPluginReentrancy();
   result.Return(dispatcher(), PPP_Class_Proxy::CreateProxiedObject(
@@ -516,7 +518,7 @@
     static_cast<HostDispatcher*>(dispatcher())->set_allow_plugin_reentrancy();
 }
 
-void PPB_Var_Deprecated_Proxy::DoReleaseObject(int64 object_id) {
+void PPB_Var_Deprecated_Proxy::DoReleaseObject(int64_t object_id) {
   PP_Var var = { PP_VARTYPE_OBJECT };
   var.value.as_id = object_id;
   ppb_var_impl_->Release(var);
diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.h b/ppapi/proxy/ppb_var_deprecated_proxy.h
index 344ccd5f..b5a6d185 100644
--- a/ppapi/proxy/ppb_var_deprecated_proxy.h
+++ b/ppapi/proxy/ppb_var_deprecated_proxy.h
@@ -5,8 +5,11 @@
 #ifndef PPAPI_PROXY_PPB_VAR_DEPRECATED_PROXY_H_
 #define PPAPI_PROXY_PPB_VAR_DEPRECATED_PROXY_H_
 
+#include <stdint.h>
+
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/proxy/interface_proxy.h"
@@ -35,8 +38,8 @@
 
  private:
   // Message handlers.
-  void OnMsgAddRefObject(int64 object_id);
-  void OnMsgReleaseObject(int64 object_id);
+  void OnMsgAddRefObject(int64_t object_id);
+  void OnMsgReleaseObject(int64_t object_id);
   void OnMsgHasProperty(SerializedVarReceiveInput var,
                         SerializedVarReceiveInput name,
                         SerializedVarOutParam exception,
@@ -77,18 +80,18 @@
                       SerializedVarOutParam exception,
                       SerializedVarReturnValue result);
   void OnMsgIsInstanceOfDeprecated(SerializedVarReceiveInput var,
-                                   int64 ppp_class,
-                                   int64* ppp_class_data,
+                                   int64_t ppp_class,
+                                   int64_t* ppp_class_data,
                                    PP_Bool* result);
   void OnMsgCreateObjectDeprecated(PP_Instance instance,
-                                   int64 ppp_class,
-                                   int64 ppp_class_data,
+                                   int64_t ppp_class,
+                                   int64_t ppp_class_data,
                                    SerializedVarReturnValue result);
 
   // Call in the host for messages that can be reentered.
   void SetAllowPluginReentrancy();
 
-  void DoReleaseObject(int64 object_id);
+  void DoReleaseObject(int64_t object_id);
 
   const PPB_Var_Deprecated* ppb_var_impl_;
 
diff --git a/ppapi/proxy/ppb_var_unittest.cc b/ppapi/proxy/ppb_var_unittest.cc
index 98b6428..cfabf0f 100644
--- a/ppapi/proxy/ppb_var_unittest.cc
+++ b/ppapi/proxy/ppb_var_unittest.cc
@@ -2,6 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
diff --git a/ppapi/proxy/ppb_video_decoder_proxy.cc b/ppapi/proxy/ppb_video_decoder_proxy.cc
index e63423d..1ec9605 100644
--- a/ppapi/proxy/ppb_video_decoder_proxy.cc
+++ b/ppapi/proxy/ppb_video_decoder_proxy.cc
@@ -5,6 +5,7 @@
 #include "ppapi/proxy/ppb_video_decoder_proxy.h"
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/numerics/safe_conversions.h"
 #include "gpu/command_buffer/client/gles2_implementation.h"
 #include "ppapi/proxy/enter_proxy.h"
@@ -230,9 +231,10 @@
           instance, graphics_context.host_resource(), profile));
 }
 
-void PPB_VideoDecoder_Proxy::OnMsgDecode(
-    const HostResource& decoder,
-    const HostResource& buffer, int32 id, uint32 size) {
+void PPB_VideoDecoder_Proxy::OnMsgDecode(const HostResource& decoder,
+                                         const HostResource& buffer,
+                                         int32_t id,
+                                         uint32_t size) {
   EnterHostFromHostResourceForceCallback<PPB_VideoDecoder_Dev_API> enter(
       decoder, callback_factory_,
       &PPB_VideoDecoder_Proxy::SendMsgEndOfBitstreamACKToPlugin, decoder, id);
@@ -254,7 +256,8 @@
 }
 
 void PPB_VideoDecoder_Proxy::OnMsgReusePictureBuffer(
-    const HostResource& decoder, int32 picture_buffer_id) {
+    const HostResource& decoder,
+    int32_t picture_buffer_id) {
   EnterHostFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder);
   if (enter.succeeded())
     enter.object()->ReusePictureBuffer(picture_buffer_id);
@@ -283,7 +286,9 @@
 }
 
 void PPB_VideoDecoder_Proxy::SendMsgEndOfBitstreamACKToPlugin(
-    int32_t result, const HostResource& decoder, int32 id) {
+    int32_t result,
+    const HostResource& decoder,
+    int32_t id) {
   dispatcher()->Send(new PpapiMsg_PPBVideoDecoder_EndOfBitstreamACK(
       API_ID_PPB_VIDEO_DECODER_DEV, decoder, id, result));
 }
diff --git a/ppapi/proxy/ppb_video_decoder_proxy.h b/ppapi/proxy/ppb_video_decoder_proxy.h
index dbc030e4..0b2a6f69 100644
--- a/ppapi/proxy/ppb_video_decoder_proxy.h
+++ b/ppapi/proxy/ppb_video_decoder_proxy.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_PPB_VIDEO_DECODER_PROXY_H_
 #define PPAPI_PROXY_PPB_VIDEO_DECODER_PROXY_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/proxy/interface_proxy.h"
 #include "ppapi/proxy/proxy_completion_callback_factory.h"
@@ -38,23 +41,24 @@
                    const ppapi::HostResource& graphics_context,
                    PP_VideoDecoder_Profile profile,
                    ppapi::HostResource* result);
-  void OnMsgDecode(
-      const ppapi::HostResource& decoder,
-      const ppapi::HostResource& buffer, int32 id, uint32 size);
+  void OnMsgDecode(const ppapi::HostResource& decoder,
+                   const ppapi::HostResource& buffer,
+                   int32_t id,
+                   uint32_t size);
   void OnMsgAssignPictureBuffers(
       const ppapi::HostResource& decoder,
       const std::vector<PP_PictureBuffer_Dev>& buffers);
-  void OnMsgReusePictureBuffer(
-      const ppapi::HostResource& decoder,
-      int32 picture_buffer_id);
+  void OnMsgReusePictureBuffer(const ppapi::HostResource& decoder,
+                               int32_t picture_buffer_id);
   void OnMsgFlush(const ppapi::HostResource& decoder);
   void OnMsgReset(const ppapi::HostResource& decoder);
   void OnMsgDestroy(const ppapi::HostResource& decoder);
 
   // Send a message from the renderer process to the plugin process to tell it
   // to run its callback.
-  void SendMsgEndOfBitstreamACKToPlugin(
-      int32_t result, const ppapi::HostResource& decoder, int32 id);
+  void SendMsgEndOfBitstreamACKToPlugin(int32_t result,
+                                        const ppapi::HostResource& decoder,
+                                        int32_t id);
   void SendMsgFlushACKToPlugin(
       int32_t result, const ppapi::HostResource& decoder);
   void SendMsgResetACKToPlugin(
diff --git a/ppapi/proxy/ppb_x509_certificate_private_proxy.cc b/ppapi/proxy/ppb_x509_certificate_private_proxy.cc
index df58f43..8ed49d6f 100644
--- a/ppapi/proxy/ppb_x509_certificate_private_proxy.cc
+++ b/ppapi/proxy/ppb_x509_certificate_private_proxy.cc
@@ -4,6 +4,7 @@
 
 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h"
 
+#include "base/macros.h"
 #include "ppapi/c/private/ppb_x509_certificate_private.h"
 #include "ppapi/proxy/plugin_globals.h"
 #include "ppapi/proxy/ppapi_messages.h"
diff --git a/ppapi/proxy/ppb_x509_certificate_private_proxy.h b/ppapi/proxy/ppb_x509_certificate_private_proxy.h
index 95d8f2cd..4a45117 100644
--- a/ppapi/proxy/ppb_x509_certificate_private_proxy.h
+++ b/ppapi/proxy/ppb_x509_certificate_private_proxy.h
@@ -5,8 +5,8 @@
 #ifndef PPAPI_PROXY_PPB_X509_CERTIFICATE_PRIVATE_PROXY_H_
 #define PPAPI_PROXY_PPB_X509_CERTIFICATE_PRIVATE_PROXY_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/pp_resource.h"
 #include "ppapi/proxy/interface_proxy.h"
diff --git a/ppapi/proxy/ppp_class_proxy.cc b/ppapi/proxy/ppp_class_proxy.cc
index 3c28d0d5..f8301e0 100644
--- a/ppapi/proxy/ppp_class_proxy.cc
+++ b/ppapi/proxy/ppp_class_proxy.cc
@@ -11,8 +11,8 @@
 #include "ppapi/proxy/plugin_globals.h"
 #include "ppapi/proxy/ppapi_messages.h"
 #include "ppapi/proxy/serialized_var.h"
-#include "ppapi/shared_impl/proxy_lock.h"
 #include "ppapi/shared_impl/api_id.h"
+#include "ppapi/shared_impl/proxy_lock.h"
 
 namespace ppapi {
 namespace proxy {
@@ -24,15 +24,12 @@
 // Represents a plugin-implemented class in the browser process. This just
 // stores the data necessary to call back the plugin.
 struct ObjectProxy {
-  ObjectProxy(Dispatcher* d, int64 p, int64 ud)
-      : dispatcher(d),
-        ppp_class(p),
-        user_data(ud) {
-  }
+  ObjectProxy(Dispatcher* d, int64_t p, int64_t ud)
+      : dispatcher(d), ppp_class(p), user_data(ud) {}
 
   Dispatcher* dispatcher;
-  int64 ppp_class;
-  int64 user_data;
+  int64_t ppp_class;
+  int64_t user_data;
 };
 
 ObjectProxy* ToObjectProxy(void* data) {
@@ -187,16 +184,16 @@
 
 // Plugin helper functions -----------------------------------------------------
 
-// Converts an int64 object from IPC to a PPP_Class* for calling into the
+// Converts an int64_t object from IPC to a PPP_Class* for calling into the
 // plugin's implementation.
-const PPP_Class_Deprecated* ToPPPClass(int64 value) {
+const PPP_Class_Deprecated* ToPPPClass(int64_t value) {
   return reinterpret_cast<const PPP_Class_Deprecated*>(
       static_cast<intptr_t>(value));
 }
 
-// Converts an int64 object from IPC to a void* for calling into the plugin's
+// Converts an int64_t object from IPC to a void* for calling into the plugin's
 // implementation as the user data.
-void* ToUserData(int64 value) {
+void* ToUserData(int64_t value) {
   return reinterpret_cast<void*>(static_cast<intptr_t>(value));
 }
 
@@ -220,8 +217,8 @@
 PP_Var PPP_Class_Proxy::CreateProxiedObject(const PPB_Var_Deprecated* var,
                                             Dispatcher* dispatcher,
                                             PP_Instance instance_id,
-                                            int64 ppp_class,
-                                            int64 class_data) {
+                                            int64_t ppp_class,
+                                            int64_t class_data) {
   ObjectProxy* object_proxy = new ObjectProxy(dispatcher,
                                               ppp_class, class_data);
   return var->CreateObject(instance_id, &class_interface, object_proxy);
@@ -230,8 +227,8 @@
 // static
 PP_Bool PPP_Class_Proxy::IsInstanceOf(const PPB_Var_Deprecated* ppb_var_impl,
                                       const PP_Var& var,
-                                      int64 ppp_class,
-                                      int64* ppp_class_data) {
+                                      int64_t ppp_class,
+                                      int64_t* ppp_class_data) {
   void* proxied_object = NULL;
   if (ppb_var_impl->IsInstanceOf(var,
                                  &class_interface,
@@ -272,7 +269,8 @@
   return handled;
 }
 
-void PPP_Class_Proxy::OnMsgHasProperty(int64 ppp_class, int64 object,
+void PPP_Class_Proxy::OnMsgHasProperty(int64_t ppp_class,
+                                       int64_t object,
                                        SerializedVarReceiveInput property,
                                        SerializedVarOutParam exception,
                                        bool* result) {
@@ -284,7 +282,8 @@
                               exception.OutParam(dispatcher()));
 }
 
-void PPP_Class_Proxy::OnMsgHasMethod(int64 ppp_class, int64 object,
+void PPP_Class_Proxy::OnMsgHasMethod(int64_t ppp_class,
+                                     int64_t object,
                                      SerializedVarReceiveInput property,
                                      SerializedVarOutParam exception,
                                      bool* result) {
@@ -296,7 +295,8 @@
                               exception.OutParam(dispatcher()));
 }
 
-void PPP_Class_Proxy::OnMsgGetProperty(int64 ppp_class, int64 object,
+void PPP_Class_Proxy::OnMsgGetProperty(int64_t ppp_class,
+                                       int64_t object,
                                        SerializedVarReceiveInput property,
                                        SerializedVarOutParam exception,
                                        SerializedVarReturnValue result) {
@@ -309,7 +309,8 @@
 }
 
 void PPP_Class_Proxy::OnMsgEnumerateProperties(
-    int64 ppp_class, int64 object,
+    int64_t ppp_class,
+    int64_t object,
     std::vector<SerializedVar>* props,
     SerializedVarOutParam exception) {
   if (!ValidateUserData(ppp_class, object, &exception))
@@ -318,7 +319,8 @@
   // TODO(brettw) implement this.
 }
 
-void PPP_Class_Proxy::OnMsgSetProperty(int64 ppp_class, int64 object,
+void PPP_Class_Proxy::OnMsgSetProperty(int64_t ppp_class,
+                                       int64_t object,
                                        SerializedVarReceiveInput property,
                                        SerializedVarReceiveInput value,
                                        SerializedVarOutParam exception) {
@@ -329,7 +331,8 @@
       exception.OutParam(dispatcher()));
 }
 
-void PPP_Class_Proxy::OnMsgRemoveProperty(int64 ppp_class, int64 object,
+void PPP_Class_Proxy::OnMsgRemoveProperty(int64_t ppp_class,
+                                          int64_t object,
                                           SerializedVarReceiveInput property,
                                           SerializedVarOutParam exception) {
   if (!ValidateUserData(ppp_class, object, &exception))
@@ -339,12 +342,12 @@
       exception.OutParam(dispatcher()));
 }
 
-void PPP_Class_Proxy::OnMsgCall(
-    int64 ppp_class, int64 object,
-    SerializedVarReceiveInput method_name,
-    SerializedVarVectorReceiveInput arg_vector,
-    SerializedVarOutParam exception,
-    SerializedVarReturnValue result) {
+void PPP_Class_Proxy::OnMsgCall(int64_t ppp_class,
+                                int64_t object,
+                                SerializedVarReceiveInput method_name,
+                                SerializedVarVectorReceiveInput arg_vector,
+                                SerializedVarOutParam exception,
+                                SerializedVarReturnValue result) {
   if (!ValidateUserData(ppp_class, object, &exception))
     return;
   uint32_t arg_count = 0;
@@ -354,11 +357,11 @@
       arg_count, args, exception.OutParam(dispatcher())));
 }
 
-void PPP_Class_Proxy::OnMsgConstruct(
-    int64 ppp_class, int64 object,
-    SerializedVarVectorReceiveInput arg_vector,
-    SerializedVarOutParam exception,
-    SerializedVarReturnValue result) {
+void PPP_Class_Proxy::OnMsgConstruct(int64_t ppp_class,
+                                     int64_t object,
+                                     SerializedVarVectorReceiveInput arg_vector,
+                                     SerializedVarOutParam exception,
+                                     SerializedVarReturnValue result) {
   if (!ValidateUserData(ppp_class, object, &exception))
     return;
   uint32_t arg_count = 0;
@@ -368,7 +371,7 @@
       ToUserData(object), arg_count, args, exception.OutParam(dispatcher())));
 }
 
-void PPP_Class_Proxy::OnMsgDeallocate(int64 ppp_class, int64 object) {
+void PPP_Class_Proxy::OnMsgDeallocate(int64_t ppp_class, int64_t object) {
   if (!ValidateUserData(ppp_class, object, NULL))
     return;
   PluginGlobals::Get()->plugin_var_tracker()->PluginImplementedObjectDestroyed(
@@ -376,7 +379,8 @@
   CallWhileUnlocked(ToPPPClass(ppp_class)->Deallocate, ToUserData(object));
 }
 
-bool PPP_Class_Proxy::ValidateUserData(int64 ppp_class, int64 class_data,
+bool PPP_Class_Proxy::ValidateUserData(int64_t ppp_class,
+                                       int64_t class_data,
                                        SerializedVarOutParam* exception) {
   if (!PluginGlobals::Get()->plugin_var_tracker()->ValidatePluginObjectCall(
           ToPPPClass(ppp_class), ToUserData(class_data))) {
diff --git a/ppapi/proxy/ppp_class_proxy.h b/ppapi/proxy/ppp_class_proxy.h
index f890b3dd..c70b564 100644
--- a/ppapi/proxy/ppp_class_proxy.h
+++ b/ppapi/proxy/ppp_class_proxy.h
@@ -5,9 +5,11 @@
 #ifndef PPAPI_PROXY_PPP_CLASS_PROXY_H_
 #define PPAPI_PROXY_PPP_CLASS_PROXY_H_
 
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/pp_var.h"
 #include "ppapi/proxy/interface_proxy.h"
@@ -39,56 +41,64 @@
   static PP_Var CreateProxiedObject(const PPB_Var_Deprecated* var,
                                     Dispatcher* dispatcher,
                                     PP_Instance instance_id,
-                                    int64 ppp_class,
-                                    int64 class_data);
+                                    int64_t ppp_class,
+                                    int64_t class_data);
 
   static PP_Bool IsInstanceOf(const PPB_Var_Deprecated* ppb_var_impl,
                               const PP_Var& var,
-                              int64 ppp_class,
-                              int64* ppp_class_data);
+                              int64_t ppp_class,
+                              int64_t* ppp_class_data);
 
   // InterfaceProxy implementation.
   virtual bool OnMessageReceived(const IPC::Message& msg);
 
  private:
   // IPC message handlers.
-  void OnMsgHasProperty(int64 ppp_class, int64 object,
+  void OnMsgHasProperty(int64_t ppp_class,
+                        int64_t object,
                         SerializedVarReceiveInput property,
                         SerializedVarOutParam exception,
                         bool* result);
-  void OnMsgHasMethod(int64 ppp_class, int64 object,
+  void OnMsgHasMethod(int64_t ppp_class,
+                      int64_t object,
                       SerializedVarReceiveInput property,
                       SerializedVarOutParam exception,
                       bool* result);
-  void OnMsgGetProperty(int64 ppp_class, int64 object,
+  void OnMsgGetProperty(int64_t ppp_class,
+                        int64_t object,
                         SerializedVarReceiveInput property,
                         SerializedVarOutParam exception,
                         SerializedVarReturnValue result);
-  void OnMsgEnumerateProperties(
-      int64 ppp_class, int64 object,
-      std::vector<SerializedVar>* props,
-      SerializedVarOutParam exception);
-  void OnMsgSetProperty(int64 ppp_class, int64 object,
+  void OnMsgEnumerateProperties(int64_t ppp_class,
+                                int64_t object,
+                                std::vector<SerializedVar>* props,
+                                SerializedVarOutParam exception);
+  void OnMsgSetProperty(int64_t ppp_class,
+                        int64_t object,
                         SerializedVarReceiveInput property,
                         SerializedVarReceiveInput value,
                         SerializedVarOutParam exception);
-  void OnMsgRemoveProperty(int64 ppp_class, int64 object,
+  void OnMsgRemoveProperty(int64_t ppp_class,
+                           int64_t object,
                            SerializedVarReceiveInput property,
                            SerializedVarOutParam exception);
-  void OnMsgCall(int64 ppp_class, int64 object,
+  void OnMsgCall(int64_t ppp_class,
+                 int64_t object,
                  SerializedVarReceiveInput method_name,
                  SerializedVarVectorReceiveInput arg_vector,
                  SerializedVarOutParam exception,
                  SerializedVarReturnValue result);
-  void OnMsgConstruct(int64 ppp_class, int64 object,
+  void OnMsgConstruct(int64_t ppp_class,
+                      int64_t object,
                       SerializedVarVectorReceiveInput arg_vector,
                       SerializedVarOutParam exception,
                       SerializedVarReturnValue result);
-  void OnMsgDeallocate(int64 ppp_class, int64 object);
+  void OnMsgDeallocate(int64_t ppp_class, int64_t object);
 
   // Returns true if the given class/data points to a plugin-implemented
   // object. On failure, the exception, if non-NULL, will also be set.
-  bool ValidateUserData(int64 ppp_class, int64 class_data,
+  bool ValidateUserData(int64_t ppp_class,
+                        int64_t class_data,
                         SerializedVarOutParam* exception);
 
   DISALLOW_COPY_AND_ASSIGN(PPP_Class_Proxy);
diff --git a/ppapi/proxy/ppp_content_decryptor_private_proxy.h b/ppapi/proxy/ppp_content_decryptor_private_proxy.h
index 0df8734..2ab19c3 100644
--- a/ppapi/proxy/ppp_content_decryptor_private_proxy.h
+++ b/ppapi/proxy/ppp_content_decryptor_private_proxy.h
@@ -5,9 +5,12 @@
 #ifndef PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_
 #define PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/private/ppp_content_decryptor_private.h"
 #include "ppapi/proxy/interface_proxy.h"
diff --git a/ppapi/proxy/ppp_find_proxy.cc b/ppapi/proxy/ppp_find_proxy.cc
index abd5663..c5d62b7 100644
--- a/ppapi/proxy/ppp_find_proxy.cc
+++ b/ppapi/proxy/ppp_find_proxy.cc
@@ -4,6 +4,7 @@
 
 #include "ppapi/proxy/ppp_find_proxy.h"
 
+#include "build/build_config.h"
 #include "ppapi/proxy/host_dispatcher.h"
 #include "ppapi/proxy/ppapi_messages.h"
 #include "ppapi/shared_impl/api_id.h"
diff --git a/ppapi/proxy/ppp_find_proxy.h b/ppapi/proxy/ppp_find_proxy.h
index 6d22304..8e07d7e 100644
--- a/ppapi/proxy/ppp_find_proxy.h
+++ b/ppapi/proxy/ppp_find_proxy.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "ppapi/c/private/ppp_find_private.h"
 #include "ppapi/proxy/interface_proxy.h"
 
diff --git a/ppapi/proxy/ppp_graphics_3d_proxy.cc b/ppapi/proxy/ppp_graphics_3d_proxy.cc
index b5f0ac1..50f7fe56a 100644
--- a/ppapi/proxy/ppp_graphics_3d_proxy.cc
+++ b/ppapi/proxy/ppp_graphics_3d_proxy.cc
@@ -4,6 +4,7 @@
 
 #include "ppapi/proxy/ppp_graphics_3d_proxy.h"
 
+#include "build/build_config.h"
 #include "ppapi/c/ppp_graphics_3d.h"
 #include "ppapi/proxy/host_dispatcher.h"
 #include "ppapi/proxy/plugin_dispatcher.h"
diff --git a/ppapi/proxy/ppp_graphics_3d_proxy.h b/ppapi/proxy/ppp_graphics_3d_proxy.h
index a6f7eb63b..6897e6b 100644
--- a/ppapi/proxy/ppp_graphics_3d_proxy.h
+++ b/ppapi/proxy/ppp_graphics_3d_proxy.h
@@ -5,6 +5,7 @@
 #ifndef PPAPI_PROXY_PPP_GRAPHICS_3D_PROXY_H_
 #define PPAPI_PROXY_PPP_GRAPHICS_3D_PROXY_H_
 
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/ppp_graphics_3d.h"
 #include "ppapi/proxy/interface_proxy.h"
diff --git a/ppapi/proxy/ppp_input_event_proxy.cc b/ppapi/proxy/ppp_input_event_proxy.cc
index cbf6a63..b256a2b 100644
--- a/ppapi/proxy/ppp_input_event_proxy.cc
+++ b/ppapi/proxy/ppp_input_event_proxy.cc
@@ -4,6 +4,7 @@
 
 #include "ppapi/proxy/ppp_input_event_proxy.h"
 
+#include "build/build_config.h"
 #include "ppapi/c/ppp_input_event.h"
 #include "ppapi/proxy/host_dispatcher.h"
 #include "ppapi/proxy/plugin_dispatcher.h"
diff --git a/ppapi/proxy/ppp_input_event_proxy.h b/ppapi/proxy/ppp_input_event_proxy.h
index 9fbc418..01479da7 100644
--- a/ppapi/proxy/ppp_input_event_proxy.h
+++ b/ppapi/proxy/ppp_input_event_proxy.h
@@ -5,6 +5,7 @@
 #ifndef PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_
 #define PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_
 
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/ppp_input_event.h"
 #include "ppapi/proxy/interface_proxy.h"
diff --git a/ppapi/proxy/ppp_instance_private_proxy.h b/ppapi/proxy/ppp_instance_private_proxy.h
index 4fc3a3a0..f430203 100644
--- a/ppapi/proxy/ppp_instance_private_proxy.h
+++ b/ppapi/proxy/ppp_instance_private_proxy.h
@@ -5,6 +5,7 @@
 #ifndef PPAPI_PROXY_PPP_INSTANCE_PRIVATE_PROXY_H_
 #define PPAPI_PROXY_PPP_INSTANCE_PRIVATE_PROXY_H_
 
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/pp_resource.h"
 #include "ppapi/c/pp_var.h"
diff --git a/ppapi/proxy/ppp_instance_private_proxy_unittest.cc b/ppapi/proxy/ppp_instance_private_proxy_unittest.cc
index 8b758d9..cbf9f9cc 100644
--- a/ppapi/proxy/ppp_instance_private_proxy_unittest.cc
+++ b/ppapi/proxy/ppp_instance_private_proxy_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/message_loop/message_loop.h"
 #include "base/test/test_timeouts.h"
@@ -178,7 +180,7 @@
   EXPECT_EQ(1, plugin().var_tracker().GetRefCountForObject(instance_obj));
   // Check the host-side var exists with the expected id and has 1 refcount (the
   // refcount on behalf of the plugin).
-  int32 expected_host_id =
+  int32_t expected_host_id =
       plugin().var_tracker().GetHostObject(instance_obj).value.as_id;
   Var* host_var = host().var_tracker().GetVar(expected_host_id);
   ASSERT_TRUE(host_var);
diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc
index a7a0699..37a848b 100644
--- a/ppapi/proxy/ppp_instance_proxy.cc
+++ b/ppapi/proxy/ppp_instance_proxy.cc
@@ -4,9 +4,13 @@
 
 #include "ppapi/proxy/ppp_instance_proxy.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "base/bind.h"
+#include "build/build_config.h"
 #include "ppapi/c/pp_var.h"
 #include "ppapi/c/ppb_core.h"
 #include "ppapi/c/ppb_fullscreen.h"
diff --git a/ppapi/proxy/ppp_instance_proxy_unittest.cc b/ppapi/proxy/ppp_instance_proxy_unittest.cc
index 18ec919..755d83b 100644
--- a/ppapi/proxy/ppp_instance_proxy_unittest.cc
+++ b/ppapi/proxy/ppp_instance_proxy_unittest.cc
@@ -2,6 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/synchronization/waitable_event.h"
 #include "ipc/ipc_message_utils.h"
 #include "ppapi/c/pp_var.h"
diff --git a/ppapi/proxy/ppp_messaging_proxy.h b/ppapi/proxy/ppp_messaging_proxy.h
index f232c6b..753c771c 100644
--- a/ppapi/proxy/ppp_messaging_proxy.h
+++ b/ppapi/proxy/ppp_messaging_proxy.h
@@ -6,6 +6,7 @@
 #define PPAPI_PROXY_PPP_MESSAGING_PROXY_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/ppp_messaging.h"
 #include "ppapi/proxy/interface_proxy.h"
diff --git a/ppapi/proxy/ppp_mouse_lock_proxy.cc b/ppapi/proxy/ppp_mouse_lock_proxy.cc
index 66dc130..30aadce 100644
--- a/ppapi/proxy/ppp_mouse_lock_proxy.cc
+++ b/ppapi/proxy/ppp_mouse_lock_proxy.cc
@@ -4,6 +4,7 @@
 
 #include "ppapi/proxy/ppp_mouse_lock_proxy.h"
 
+#include "build/build_config.h"
 #include "ppapi/c/ppp_mouse_lock.h"
 #include "ppapi/proxy/host_dispatcher.h"
 #include "ppapi/proxy/ppapi_messages.h"
diff --git a/ppapi/proxy/ppp_mouse_lock_proxy.h b/ppapi/proxy/ppp_mouse_lock_proxy.h
index f04d7f3..dfb4513 100644
--- a/ppapi/proxy/ppp_mouse_lock_proxy.h
+++ b/ppapi/proxy/ppp_mouse_lock_proxy.h
@@ -6,6 +6,7 @@
 #define PPAPI_PROXY_PPP_MOUSE_LOCK_PROXY_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/ppp_mouse_lock.h"
 #include "ppapi/proxy/interface_proxy.h"
diff --git a/ppapi/proxy/ppp_pdf_proxy.cc b/ppapi/proxy/ppp_pdf_proxy.cc
index 4b16dd6..cafde23 100644
--- a/ppapi/proxy/ppp_pdf_proxy.cc
+++ b/ppapi/proxy/ppp_pdf_proxy.cc
@@ -4,6 +4,7 @@
 
 #include "ppapi/proxy/ppp_pdf_proxy.h"
 
+#include "build/build_config.h"
 #include "ppapi/proxy/host_dispatcher.h"
 #include "ppapi/proxy/ppapi_messages.h"
 #include "ppapi/shared_impl/proxy_lock.h"
diff --git a/ppapi/proxy/ppp_pdf_proxy.h b/ppapi/proxy/ppp_pdf_proxy.h
index 2544c0f5..5cc2790 100644
--- a/ppapi/proxy/ppp_pdf_proxy.h
+++ b/ppapi/proxy/ppp_pdf_proxy.h
@@ -5,6 +5,7 @@
 #ifndef PPAPI_PROXY_PPP_PDF_PROXY_H_
 #define PPAPI_PROXY_PPP_PDF_PROXY_H_
 
+#include "base/macros.h"
 #include "ppapi/c/private/ppp_pdf.h"
 #include "ppapi/proxy/interface_proxy.h"
 
diff --git a/ppapi/proxy/ppp_printing_proxy.cc b/ppapi/proxy/ppp_printing_proxy.cc
index 81710efc..512f0ed 100644
--- a/ppapi/proxy/ppp_printing_proxy.cc
+++ b/ppapi/proxy/ppp_printing_proxy.cc
@@ -7,6 +7,7 @@
 #include <string.h>
 
 #include "base/numerics/safe_conversions.h"
+#include "build/build_config.h"
 #include "ppapi/c/dev/ppp_printing_dev.h"
 #include "ppapi/proxy/host_dispatcher.h"
 #include "ppapi/proxy/plugin_dispatcher.h"
diff --git a/ppapi/proxy/ppp_printing_proxy.h b/ppapi/proxy/ppp_printing_proxy.h
index 03bebf7..7c4025d 100644
--- a/ppapi/proxy/ppp_printing_proxy.h
+++ b/ppapi/proxy/ppp_printing_proxy.h
@@ -5,9 +5,12 @@
 #ifndef PPAPI_PROXY_PPP_PRINTING_PROXY_H_
 #define PPAPI_PROXY_PPP_PRINTING_PROXY_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "ppapi/c/dev/ppp_printing_dev.h"
 #include "ppapi/proxy/interface_proxy.h"
 
diff --git a/ppapi/proxy/ppp_text_input_proxy.cc b/ppapi/proxy/ppp_text_input_proxy.cc
index 061b73cd..235e0e0 100644
--- a/ppapi/proxy/ppp_text_input_proxy.cc
+++ b/ppapi/proxy/ppp_text_input_proxy.cc
@@ -4,6 +4,7 @@
 
 #include "ppapi/proxy/ppp_text_input_proxy.h"
 
+#include "build/build_config.h"
 #include "ppapi/c/dev/ppp_text_input_dev.h"
 #include "ppapi/proxy/host_dispatcher.h"
 #include "ppapi/proxy/ppapi_messages.h"
diff --git a/ppapi/proxy/ppp_text_input_proxy.h b/ppapi/proxy/ppp_text_input_proxy.h
index 0ae023c..5771256 100644
--- a/ppapi/proxy/ppp_text_input_proxy.h
+++ b/ppapi/proxy/ppp_text_input_proxy.h
@@ -5,7 +5,10 @@
 #ifndef PPAPI_PROXY_PPP_TEXT_INPUT_PROXY_H_
 #define PPAPI_PROXY_PPP_TEXT_INPUT_PROXY_H_
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/c/dev/ppp_text_input_dev.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/proxy/interface_proxy.h"
diff --git a/ppapi/proxy/ppp_video_decoder_proxy.h b/ppapi/proxy/ppp_video_decoder_proxy.h
index 54beac1..c4b23ef 100644
--- a/ppapi/proxy/ppp_video_decoder_proxy.h
+++ b/ppapi/proxy/ppp_video_decoder_proxy.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_PPP_VIDEO_DECODER_PROXY_H_
 #define PPAPI_PROXY_PPP_VIDEO_DECODER_PROXY_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/c/dev/ppp_video_decoder_dev.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/proxy/interface_proxy.h"
diff --git a/ppapi/proxy/printing_resource.h b/ppapi/proxy/printing_resource.h
index deaa1f5c..0ef5c77 100644
--- a/ppapi/proxy/printing_resource.h
+++ b/ppapi/proxy/printing_resource.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_PRINTING_RESOURCE_H_
 #define PPAPI_PROXY_PRINTING_RESOURCE_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/proxy/connection.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
diff --git a/ppapi/proxy/printing_resource_unittest.cc b/ppapi/proxy/printing_resource_unittest.cc
index 6551ba1..09589c34 100644
--- a/ppapi/proxy/printing_resource_unittest.cc
+++ b/ppapi/proxy/printing_resource_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include <cstring>
 
 #include "base/message_loop/message_loop.h"
diff --git a/ppapi/proxy/proxy_array_output.h b/ppapi/proxy/proxy_array_output.h
index 6d15e0b..455b026 100644
--- a/ppapi/proxy/proxy_array_output.h
+++ b/ppapi/proxy/proxy_array_output.h
@@ -5,6 +5,8 @@
 #ifndef PPAPI_PROXY_PROXY_ARRAY_OUTPUT_H_
 #define PPAPI_PROXY_PROXY_ARRAY_OUTPUT_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/logging.h"
diff --git a/ppapi/proxy/proxy_channel.cc b/ppapi/proxy/proxy_channel.cc
index 2784e4b9..23b0449 100644
--- a/ppapi/proxy/proxy_channel.cc
+++ b/ppapi/proxy/proxy_channel.cc
@@ -5,6 +5,7 @@
 #include "ppapi/proxy/proxy_channel.h"
 
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "ipc/ipc_platform_file.h"
 #include "ipc/ipc_test_sink.h"
 
diff --git a/ppapi/proxy/proxy_channel.h b/ppapi/proxy/proxy_channel.h
index fbd31ad85..0e657f73 100644
--- a/ppapi/proxy/proxy_channel.h
+++ b/ppapi/proxy/proxy_channel.h
@@ -6,9 +6,11 @@
 #define PPAPI_PROXY_PROXY_CHANNEL_H_
 
 #include "base/files/scoped_file.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/process/process.h"
+#include "build/build_config.h"
 #include "ipc/ipc_listener.h"
 #include "ipc/ipc_platform_file.h"
 #include "ipc/ipc_sender.h"
diff --git a/ppapi/proxy/proxy_completion_callback_factory.h b/ppapi/proxy/proxy_completion_callback_factory.h
index c8dabf1..71322b0 100644
--- a/ppapi/proxy/proxy_completion_callback_factory.h
+++ b/ppapi/proxy/proxy_completion_callback_factory.h
@@ -5,6 +5,8 @@
 #ifndef PPAPI_PROXY_PROXY_COMPLETION_CALLBACK_FACTORY_H_
 #define PPAPI_PROXY_PROXY_COMPLETION_CALLBACK_FACTORY_H_
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "base/message_loop/message_loop.h"
 #include "ppapi/cpp/completion_callback.h"
diff --git a/ppapi/proxy/proxy_module.h b/ppapi/proxy/proxy_module.h
index 5d3a125..21f53b1 100644
--- a/ppapi/proxy/proxy_module.h
+++ b/ppapi/proxy/proxy_module.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 
 namespace base {
diff --git a/ppapi/proxy/proxy_object_var.cc b/ppapi/proxy/proxy_object_var.cc
index cc0054f..507d2062 100644
--- a/ppapi/proxy/proxy_object_var.cc
+++ b/ppapi/proxy/proxy_object_var.cc
@@ -12,10 +12,8 @@
 namespace ppapi {
 
 ProxyObjectVar::ProxyObjectVar(PluginDispatcher* dispatcher,
-                               int32 host_var_id)
-    : dispatcher_(dispatcher),
-      host_var_id_(host_var_id),
-      user_data_(NULL) {
+                               int32_t host_var_id)
+    : dispatcher_(dispatcher), host_var_id_(host_var_id), user_data_(NULL) {
   // Should be given valid objects or we'll crash later.
   DCHECK(host_var_id_);
 }
@@ -31,7 +29,7 @@
   return PP_VARTYPE_OBJECT;
 }
 
-void ProxyObjectVar::AssignVarID(int32 id) {
+void ProxyObjectVar::AssignVarID(int32_t id) {
   return Var::AssignVarID(id);
 }
 
diff --git a/ppapi/proxy/proxy_object_var.h b/ppapi/proxy/proxy_object_var.h
index a3ba153..0690129 100644
--- a/ppapi/proxy/proxy_object_var.h
+++ b/ppapi/proxy/proxy_object_var.h
@@ -5,7 +5,10 @@
 #ifndef PPAPI_PROXY_PROXY_OBJECT_VAR_H_
 #define PPAPI_PROXY_PROXY_OBJECT_VAR_H_
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/shared_impl/var.h"
 
@@ -20,8 +23,7 @@
 // integrating this with PP_Var creation.
 class PPAPI_PROXY_EXPORT ProxyObjectVar : public Var {
  public:
-  ProxyObjectVar(proxy::PluginDispatcher* dispatcher,
-                 int32 host_var_id);
+  ProxyObjectVar(proxy::PluginDispatcher* dispatcher, int32_t host_var_id);
 
   ~ProxyObjectVar() override;
 
@@ -30,20 +32,20 @@
   PP_VarType GetType() const override;
 
   proxy::PluginDispatcher* dispatcher() const { return dispatcher_; }
-  int32 host_var_id() const { return host_var_id_; }
+  int32_t host_var_id() const { return host_var_id_; }
 
   void* user_data() const { return user_data_; }
   void set_user_data(void* ud) { user_data_ = ud; }
 
   // Expose AssignVarID on Var so the PluginResourceTracker can call us when
   // it's creating IDs.
-  void AssignVarID(int32 id);
+  void AssignVarID(int32_t id);
 
   void clear_dispatcher() { dispatcher_ = NULL; }
 
  private:
   proxy::PluginDispatcher* dispatcher_;
-  int32 host_var_id_;
+  int32_t host_var_id_;
 
   // When this object is created as representing a var implemented by the
   // plugin, this stores the user data so that we can look it up later. See
diff --git a/ppapi/proxy/raw_var_data.cc b/ppapi/proxy/raw_var_data.cc
index 7e80810d..6e4e057 100644
--- a/ppapi/proxy/raw_var_data.cc
+++ b/ppapi/proxy/raw_var_data.cc
@@ -28,8 +28,8 @@
 // When sending array buffers, if the size is over 256K, we use shared
 // memory instead of sending the data over IPC. Light testing suggests
 // shared memory is much faster for 256K and larger messages.
-static const uint32 kMinimumArrayBufferSizeForShmem = 256 * 1024;
-static uint32 g_minimum_array_buffer_size_for_shmem =
+static const uint32_t kMinimumArrayBufferSizeForShmem = 256 * 1024;
+static uint32_t g_minimum_array_buffer_size_for_shmem =
     kMinimumArrayBufferSizeForShmem;
 
 struct StackEntry {
@@ -214,7 +214,7 @@
 
 // static
 void RawVarDataGraph::SetMinimumArrayBufferSizeForShmemForTest(
-    uint32 threshold) {
+    uint32_t threshold) {
   if (threshold == 0)
     g_minimum_array_buffer_size_for_shmem = kMinimumArrayBufferSizeForShmem;
   else
@@ -444,7 +444,7 @@
   switch (type_) {
     case ARRAY_BUFFER_SHMEM_HOST: {
       base::SharedMemoryHandle host_handle;
-      uint32 size_in_bytes;
+      uint32_t size_in_bytes;
       bool ok = PpapiGlobals::Get()->GetVarTracker()->
           StopTrackingSharedMemoryHandle(host_shm_handle_id_,
                                          instance,
@@ -467,7 +467,7 @@
     }
     case ARRAY_BUFFER_NO_SHMEM: {
       result = PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar(
-          static_cast<uint32>(data_.size()), data_.data());
+          static_cast<uint32_t>(data_.size()), data_.data());
       break;
     }
     default:
diff --git a/ppapi/proxy/raw_var_data.h b/ppapi/proxy/raw_var_data.h
index 9db3100..4789ccd 100644
--- a/ppapi/proxy/raw_var_data.h
+++ b/ppapi/proxy/raw_var_data.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_RAW_VAR_DATA_H_
 #define PPAPI_PROXY_RAW_VAR_DATA_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/callback.h"
@@ -81,7 +84,7 @@
   // array buffers in IPC messages to using shared memory. This is only used
   // for testing purposes where we need to transmit small buffers using shmem
   // (in order to have fast tests).
-  static void SetMinimumArrayBufferSizeForShmemForTest(uint32 threshold);
+  static void SetMinimumArrayBufferSizeForShmemForTest(uint32_t threshold);
 
   // A list of the nodes in the graph.
   ScopedVector<RawVarData> data_;
diff --git a/ppapi/proxy/raw_var_data_unittest.cc b/ppapi/proxy/raw_var_data_unittest.cc
index 8f783c2..1e68712 100644
--- a/ppapi/proxy/raw_var_data_unittest.cc
+++ b/ppapi/proxy/raw_var_data_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "ppapi/proxy/raw_var_data.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc
index 5efd92b..fa088435 100644
--- a/ppapi/proxy/resource_creation_proxy.cc
+++ b/ppapi/proxy/resource_creation_proxy.cc
@@ -4,6 +4,7 @@
 
 #include "ppapi/proxy/resource_creation_proxy.h"
 
+#include "build/build_config.h"
 #include "ppapi/c/pp_errors.h"
 #include "ppapi/c/pp_size.h"
 #include "ppapi/proxy/audio_encoder_resource.h"
diff --git a/ppapi/proxy/resource_creation_proxy.h b/ppapi/proxy/resource_creation_proxy.h
index f1b645c..aad6bf3f 100644
--- a/ppapi/proxy/resource_creation_proxy.h
+++ b/ppapi/proxy/resource_creation_proxy.h
@@ -5,9 +5,12 @@
 #ifndef PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_
 #define PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "ipc/ipc_channel.h"
 #include "ppapi/c/pp_bool.h"
 #include "ppapi/c/pp_instance.h"
diff --git a/ppapi/proxy/resource_message_params.h b/ppapi/proxy/resource_message_params.h
index 500ebb9..9e76d1e 100644
--- a/ppapi/proxy/resource_message_params.h
+++ b/ppapi/proxy/resource_message_params.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_
 #define PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/memory/ref_counted.h"
diff --git a/ppapi/proxy/resource_message_test_sink.cc b/ppapi/proxy/resource_message_test_sink.cc
index b3f3724e..4047d59d 100644
--- a/ppapi/proxy/resource_message_test_sink.cc
+++ b/ppapi/proxy/resource_message_test_sink.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/resource_message_test_sink.h"
 
+#include <stddef.h>
+
 #include "ppapi/proxy/ppapi_messages.h"
 #include "ppapi/proxy/resource_message_params.h"
 #include "ppapi/proxy/serialized_handle.h"
@@ -14,10 +16,10 @@
 namespace {
 
 // Backend for GetAllResource[Calls|Replies]Matching.
-template<class WrapperMessage, class Params>
-std::vector<std::pair<Params, IPC::Message> >
-GetAllResourceMessagesMatching(const ResourceMessageTestSink& sink,
-                               uint32 id) {
+template <class WrapperMessage, class Params>
+std::vector<std::pair<Params, IPC::Message>> GetAllResourceMessagesMatching(
+    const ResourceMessageTestSink& sink,
+    uint32_t id) {
   std::vector<std::pair<Params, IPC::Message> > result;
   for (size_t i = 0; i < sink.message_count(); i++) {
     const IPC::Message* msg = sink.GetMessageAt(i);
@@ -67,7 +69,7 @@
 }
 
 bool ResourceMessageTestSink::GetFirstResourceCallMatching(
-    uint32 id,
+    uint32_t id,
     ResourceMessageCallParams* params,
     IPC::Message* nested_msg) const {
   ResourceCallVector matching_messages =
@@ -82,7 +84,7 @@
 }
 
 bool ResourceMessageTestSink::GetFirstResourceReplyMatching(
-    uint32 id,
+    uint32_t id,
     ResourceMessageReplyParams* params,
     IPC::Message* nested_msg) {
   ResourceReplyVector matching_messages =
@@ -97,28 +99,27 @@
 }
 
 ResourceMessageTestSink::ResourceCallVector
-ResourceMessageTestSink::GetAllResourceCallsMatching(uint32 id) {
+ResourceMessageTestSink::GetAllResourceCallsMatching(uint32_t id) {
   return GetAllResourceMessagesMatching<PpapiHostMsg_ResourceCall,
                                         ResourceMessageCallParams>(*this, id);
 }
 
 ResourceMessageTestSink::ResourceReplyVector
-ResourceMessageTestSink::GetAllResourceRepliesMatching(uint32 id) {
+ResourceMessageTestSink::GetAllResourceRepliesMatching(uint32_t id) {
   return GetAllResourceMessagesMatching<PpapiPluginMsg_ResourceReply,
                                         ResourceMessageReplyParams>(*this, id);
 }
 
 ResourceSyncCallHandler::ResourceSyncCallHandler(
     ResourceMessageTestSink* test_sink,
-    uint32 incoming_type,
+    uint32_t incoming_type,
     int32_t result,
     const IPC::Message& reply_msg)
     : test_sink_(test_sink),
       incoming_type_(incoming_type),
       result_(result),
       serialized_handle_(NULL),
-      reply_msg_(reply_msg) {
-}
+      reply_msg_(reply_msg) {}
 
 ResourceSyncCallHandler::~ResourceSyncCallHandler() {
 }
diff --git a/ppapi/proxy/resource_message_test_sink.h b/ppapi/proxy/resource_message_test_sink.h
index 3e40e310..b6ada44 100644
--- a/ppapi/proxy/resource_message_test_sink.h
+++ b/ppapi/proxy/resource_message_test_sink.h
@@ -34,27 +34,25 @@
   // Searches the queue for the first resource call message with a nested
   // message matching the given ID. On success, returns true and populates the
   // given params and nested message.
-  bool GetFirstResourceCallMatching(
-      uint32 id,
-      ResourceMessageCallParams* params,
-      IPC::Message* nested_msg) const;
+  bool GetFirstResourceCallMatching(uint32_t id,
+                                    ResourceMessageCallParams* params,
+                                    IPC::Message* nested_msg) const;
 
   // Like GetFirstResourceCallMatching except for replies.
-  bool GetFirstResourceReplyMatching(
-      uint32 id,
-      ResourceMessageReplyParams* params,
-      IPC::Message* nested_msg);
+  bool GetFirstResourceReplyMatching(uint32_t id,
+                                     ResourceMessageReplyParams* params,
+                                     IPC::Message* nested_msg);
 
   // Searches the queue for all resource call messages with a nested message
   // matching the given ID.
   typedef std::pair<ResourceMessageCallParams, IPC::Message> ResourceCall;
   typedef std::vector<ResourceCall> ResourceCallVector;
-  ResourceCallVector GetAllResourceCallsMatching(uint32 id);
+  ResourceCallVector GetAllResourceCallsMatching(uint32_t id);
 
   // Like GetAllResourceCallsMatching except for replies.
   typedef std::pair<ResourceMessageReplyParams, IPC::Message> ResourceReply;
   typedef std::vector<ResourceReply> ResourceReplyVector;
-  ResourceReplyVector GetAllResourceRepliesMatching(uint32 id);
+  ResourceReplyVector GetAllResourceRepliesMatching(uint32_t id);
 
  private:
   scoped_ptr<IPC::Message> sync_reply_msg_;
@@ -79,7 +77,7 @@
 class ResourceSyncCallHandler : public IPC::Listener {
  public:
   ResourceSyncCallHandler(ResourceMessageTestSink* test_sink,
-                          uint32 incoming_type,
+                          uint32_t incoming_type,
                           int32_t result,
                           const IPC::Message& reply_msg);
   ~ResourceSyncCallHandler() override;
@@ -97,7 +95,7 @@
 
  private:
   ResourceMessageTestSink* test_sink_;
-  uint32 incoming_type_;
+  uint32_t incoming_type_;
   int32_t result_;
   const SerializedHandle* serialized_handle_;  // Non-owning pointer.
   IPC::Message reply_msg_;
diff --git a/ppapi/proxy/resource_reply_thread_registrar.h b/ppapi/proxy/resource_reply_thread_registrar.h
index 193c205..256890c7 100644
--- a/ppapi/proxy/resource_reply_thread_registrar.h
+++ b/ppapi/proxy/resource_reply_thread_registrar.h
@@ -5,10 +5,12 @@
 #ifndef PPAPI_PROXY_RESOURCE_REPLY_THREAD_REGISTRAR_H_
 #define PPAPI_PROXY_RESOURCE_REPLY_THREAD_REGISTRAR_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <set>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/synchronization/lock.h"
 #include "ppapi/c/pp_resource.h"
diff --git a/ppapi/proxy/serialized_flash_menu.cc b/ppapi/proxy/serialized_flash_menu.cc
index 7c55b39d..4791b06 100644
--- a/ppapi/proxy/serialized_flash_menu.cc
+++ b/ppapi/proxy/serialized_flash_menu.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/serialized_flash_menu.h"
 
+#include <stdint.h>
+
 #include "ipc/ipc_message.h"
 #include "ppapi/c/private/ppb_flash_menu.h"
 #include "ppapi/proxy/ppapi_param_traits.h"
diff --git a/ppapi/proxy/serialized_flash_menu.h b/ppapi/proxy/serialized_flash_menu.h
index 8c1d7096..607c603 100644
--- a/ppapi/proxy/serialized_flash_menu.h
+++ b/ppapi/proxy/serialized_flash_menu.h
@@ -8,7 +8,7 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 
 namespace base {
diff --git a/ppapi/proxy/serialized_handle.cc b/ppapi/proxy/serialized_handle.cc
index ee0f359..f5eda870 100644
--- a/ppapi/proxy/serialized_handle.cc
+++ b/ppapi/proxy/serialized_handle.cc
@@ -36,14 +36,13 @@
 }
 
 SerializedHandle::SerializedHandle(const base::SharedMemoryHandle& handle,
-                                   uint32 size)
+                                   uint32_t size)
     : type_(SHARED_MEMORY),
       shm_handle_(handle),
       size_(size),
       descriptor_(IPC::InvalidPlatformFileForTransit()),
       open_flags_(0),
-      file_io_(0) {
-}
+      file_io_(0) {}
 
 SerializedHandle::SerializedHandle(
     Type type,
@@ -113,7 +112,7 @@
   bool valid_type = false;
   switch (type) {
     case SHARED_MEMORY: {
-      uint32 size = 0;
+      uint32_t size = 0;
       if (!iter->ReadUInt32(&size))
         return false;
       hdr->size = size;
diff --git a/ppapi/proxy/serialized_handle.h b/ppapi/proxy/serialized_handle.h
index 6e765fd..d7e74cc 100644
--- a/ppapi/proxy/serialized_handle.h
+++ b/ppapi/proxy/serialized_handle.h
@@ -5,11 +5,12 @@
 #ifndef PPAPI_PROXY_SERIALIZED_HANDLES_H_
 #define PPAPI_PROXY_SERIALIZED_HANDLES_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
 #include "base/atomicops.h"
-#include "base/basictypes.h"
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/shared_memory.h"
@@ -37,18 +38,17 @@
   struct Header {
     Header() : type(INVALID), size(0), open_flags(0) {}
     Header(Type type_arg,
-           uint32 size_arg,
-           int32 open_flags_arg,
+           uint32_t size_arg,
+           int32_t open_flags_arg,
            PP_Resource file_io_arg)
         : type(type_arg),
           size(size_arg),
           open_flags(open_flags_arg),
-          file_io(file_io_arg) {
-    }
+          file_io(file_io_arg) {}
 
     Type type;
-    uint32 size;
-    int32 open_flags;
+    uint32_t size;
+    int32_t open_flags;
     PP_Resource file_io;
   };
 
@@ -57,7 +57,7 @@
   explicit SerializedHandle(Type type);
 
   // Create a shared memory handle.
-  SerializedHandle(const base::SharedMemoryHandle& handle, uint32 size);
+  SerializedHandle(const base::SharedMemoryHandle& handle, uint32_t size);
 
   // Create a socket or file handle.
   SerializedHandle(const Type type,
@@ -71,7 +71,7 @@
     DCHECK(is_shmem());
     return shm_handle_;
   }
-  uint32 size() const {
+  uint32_t size() const {
     DCHECK(is_shmem());
     return size_;
   }
@@ -79,13 +79,11 @@
     DCHECK(is_socket() || is_file());
     return descriptor_;
   }
-  int32 open_flags() const {
-    return open_flags_;
-  }
+  int32_t open_flags() const { return open_flags_; }
   PP_Resource file_io() const {
     return file_io_;
   }
-  void set_shmem(const base::SharedMemoryHandle& handle, uint32 size) {
+  void set_shmem(const base::SharedMemoryHandle& handle, uint32_t size) {
     type_ = SHARED_MEMORY;
     shm_handle_ = handle;
     size_ = size;
@@ -100,7 +98,7 @@
     size_ = 0;
   }
   void set_file_handle(const IPC::PlatformFileForTransit& descriptor,
-                       int32 open_flags,
+                       int32_t open_flags,
                        PP_Resource file_io) {
     type_ = FILE;
 
@@ -144,13 +142,13 @@
   // efficient strategy.
   // These are valid if type == SHARED_MEMORY.
   base::SharedMemoryHandle shm_handle_;
-  uint32 size_;
+  uint32_t size_;
 
   // This is valid if type == SOCKET || type == FILE.
   IPC::PlatformFileForTransit descriptor_;
 
   // The following fields are valid if type == FILE.
-  int32 open_flags_;
+  int32_t open_flags_;
   // This is non-zero if file writes require quota checking.
   PP_Resource file_io_;
 };
diff --git a/ppapi/proxy/serialized_structs.h b/ppapi/proxy/serialized_structs.h
index 79c851d..3820056 100644
--- a/ppapi/proxy/serialized_structs.h
+++ b/ppapi/proxy/serialized_structs.h
@@ -5,6 +5,8 @@
 #ifndef PPAPI_PROXY_SERIALIZED_STRUCTS_H_
 #define PPAPI_PROXY_SERIALIZED_STRUCTS_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
diff --git a/ppapi/proxy/serialized_var.h b/ppapi/proxy/serialized_var.h
index 46f8ed5..3f8ec99 100644
--- a/ppapi/proxy/serialized_var.h
+++ b/ppapi/proxy/serialized_var.h
@@ -5,10 +5,13 @@
 #ifndef PPAPI_PROXY_SERIALIZED_VAR_H_
 #define PPAPI_PROXY_SERIALIZED_VAR_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "ppapi/c/pp_instance.h"
diff --git a/ppapi/proxy/serialized_var_unittest.cc b/ppapi/proxy/serialized_var_unittest.cc
index d88c848..3a5513d 100644
--- a/ppapi/proxy/serialized_var_unittest.cc
+++ b/ppapi/proxy/serialized_var_unittest.cc
@@ -2,8 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "ppapi/proxy/ppapi_proxy_test.h"
+#include <stdint.h>
 
+#include "ppapi/proxy/ppapi_proxy_test.h"
 #include "ppapi/proxy/proxy_object_var.h"
 #include "ppapi/proxy/serialized_var.h"
 #include "ppapi/shared_impl/proxy_lock.h"
diff --git a/ppapi/proxy/tcp_server_socket_private_resource.h b/ppapi/proxy/tcp_server_socket_private_resource.h
index 055b3b0..ea131e3 100644
--- a/ppapi/proxy/tcp_server_socket_private_resource.h
+++ b/ppapi/proxy/tcp_server_socket_private_resource.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PROXY_TCP_SERVER_SOCKET_PRIVATE_RESOURCE_H_
 #define PPAPI_PROXY_TCP_SERVER_SOCKET_PRIVATE_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
diff --git a/ppapi/proxy/tcp_socket_private_resource.h b/ppapi/proxy/tcp_socket_private_resource.h
index bbc5b1cc..0a36d1b7 100644
--- a/ppapi/proxy/tcp_socket_private_resource.h
+++ b/ppapi/proxy/tcp_socket_private_resource.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PROXY_TCP_SOCKET_PRIVATE_RESOURCE_H_
 #define PPAPI_PROXY_TCP_SOCKET_PRIVATE_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/tcp_socket_resource_base.h"
 #include "ppapi/thunk/ppb_tcp_socket_private_api.h"
 
diff --git a/ppapi/proxy/tcp_socket_resource.h b/ppapi/proxy/tcp_socket_resource.h
index 449cab6..57da040 100644
--- a/ppapi/proxy/tcp_socket_resource.h
+++ b/ppapi/proxy/tcp_socket_resource.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PROXY_TCP_SOCKET_RESOURCE_H_
 #define PPAPI_PROXY_TCP_SOCKET_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/tcp_socket_resource_base.h"
 #include "ppapi/thunk/ppb_tcp_socket_api.h"
 
diff --git a/ppapi/proxy/tcp_socket_resource_base.cc b/ppapi/proxy/tcp_socket_resource_base.cc
index fb4db5b..3cc4fdd 100644
--- a/ppapi/proxy/tcp_socket_resource_base.cc
+++ b/ppapi/proxy/tcp_socket_resource_base.cc
@@ -8,6 +8,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "ppapi/c/pp_bool.h"
 #include "ppapi/c/pp_errors.h"
 #include "ppapi/proxy/error_conversion.h"
diff --git a/ppapi/proxy/tcp_socket_resource_base.h b/ppapi/proxy/tcp_socket_resource_base.h
index 3274fb9..c60ff33 100644
--- a/ppapi/proxy/tcp_socket_resource_base.h
+++ b/ppapi/proxy/tcp_socket_resource_base.h
@@ -5,11 +5,13 @@
 #ifndef PPAPI_PROXY_TCP_SOCKET_RESOURCE_BASE_H_
 #define PPAPI_PROXY_TCP_SOCKET_RESOURCE_BASE_H_
 
+#include <stdint.h>
+
 #include <queue>
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "ppapi/c/ppb_tcp_socket.h"
 #include "ppapi/c/private/ppb_net_address_private.h"
diff --git a/ppapi/proxy/tracked_callback_unittest.cc b/ppapi/proxy/tracked_callback_unittest.cc
index 0a9278a..8b68b8e 100644
--- a/ppapi/proxy/tracked_callback_unittest.cc
+++ b/ppapi/proxy/tracked_callback_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/memory/ref_counted.h"
diff --git a/ppapi/proxy/truetype_font_resource.h b/ppapi/proxy/truetype_font_resource.h
index 2f44365..99cbf2f 100644
--- a/ppapi/proxy/truetype_font_resource.h
+++ b/ppapi/proxy/truetype_font_resource.h
@@ -5,9 +5,12 @@
 #ifndef PPAPI_PROXY_TRUETYPE_FONT_RESOURCE_H_
 #define PPAPI_PROXY_TRUETYPE_FONT_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <queue>
 #include <string>
 
+#include "base/macros.h"
 #include "ppapi/proxy/connection.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
diff --git a/ppapi/proxy/truetype_font_singleton_resource.cc b/ppapi/proxy/truetype_font_singleton_resource.cc
index 77a7432..277aba1 100644
--- a/ppapi/proxy/truetype_font_singleton_resource.cc
+++ b/ppapi/proxy/truetype_font_singleton_resource.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/truetype_font_singleton_resource.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "ppapi/proxy/ppapi_messages.h"
 #include "ppapi/proxy/serialized_structs.h"
diff --git a/ppapi/proxy/truetype_font_singleton_resource.h b/ppapi/proxy/truetype_font_singleton_resource.h
index df09471..3c498b05 100644
--- a/ppapi/proxy/truetype_font_singleton_resource.h
+++ b/ppapi/proxy/truetype_font_singleton_resource.h
@@ -5,9 +5,12 @@
 #ifndef PPAPI_PROXY_TRUETYPE_FONT_SINGLETON_RESOURCE_H_
 #define PPAPI_PROXY_TRUETYPE_FONT_SINGLETON_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "ppapi/proxy/connection.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/thunk/ppb_truetype_font_singleton_api.h"
diff --git a/ppapi/proxy/udp_socket_filter.h b/ppapi/proxy/udp_socket_filter.h
index faa62e09..4aa3e5c 100644
--- a/ppapi/proxy/udp_socket_filter.h
+++ b/ppapi/proxy/udp_socket_filter.h
@@ -5,10 +5,12 @@
 #ifndef PPAPI_PROXY_UDP_SOCKET_FILTER_H_
 #define PPAPI_PROXY_UDP_SOCKET_FILTER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <queue>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
 #include "base/containers/scoped_ptr_hash_map.h"
 #include "base/memory/ref_counted.h"
diff --git a/ppapi/proxy/udp_socket_private_resource.h b/ppapi/proxy/udp_socket_private_resource.h
index f335c6c9..d57ef04 100644
--- a/ppapi/proxy/udp_socket_private_resource.h
+++ b/ppapi/proxy/udp_socket_private_resource.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PROXY_UDP_SOCKET_PRIVATE_RESOURCE_H_
 #define PPAPI_PROXY_UDP_SOCKET_PRIVATE_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/proxy/udp_socket_resource_base.h"
 #include "ppapi/thunk/ppb_udp_socket_private_api.h"
diff --git a/ppapi/proxy/udp_socket_resource.h b/ppapi/proxy/udp_socket_resource.h
index 5217d969..e7ba86d 100644
--- a/ppapi/proxy/udp_socket_resource.h
+++ b/ppapi/proxy/udp_socket_resource.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PROXY_UDP_SOCKET_RESOURCE_H_
 #define PPAPI_PROXY_UDP_SOCKET_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/proxy/udp_socket_resource_base.h"
 #include "ppapi/thunk/ppb_udp_socket_api.h"
diff --git a/ppapi/proxy/udp_socket_resource_base.h b/ppapi/proxy/udp_socket_resource_base.h
index e5a8aef..30599422 100644
--- a/ppapi/proxy/udp_socket_resource_base.h
+++ b/ppapi/proxy/udp_socket_resource_base.h
@@ -5,10 +5,13 @@
 #ifndef PPAPI_PROXY_UDP_SOCKET_RESOURCE_BASE_H_
 #define PPAPI_PROXY_UDP_SOCKET_RESOURCE_BASE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <queue>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "ppapi/c/ppb_udp_socket.h"
 #include "ppapi/c/private/ppb_net_address_private.h"
diff --git a/ppapi/proxy/uma_private_resource.h b/ppapi/proxy/uma_private_resource.h
index 3215e64..67eb67b 100644
--- a/ppapi/proxy/uma_private_resource.h
+++ b/ppapi/proxy/uma_private_resource.h
@@ -5,6 +5,9 @@
 #ifndef PPAPI_PROXY_UMA_PRIVATE_RESOURCE_H_
 #define PPAPI_PROXY_UMA_PRIVATE_RESOURCE_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "ppapi/proxy/connection.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
diff --git a/ppapi/proxy/url_loader_resource.h b/ppapi/proxy/url_loader_resource.h
index f96c1aba..d349bee 100644
--- a/ppapi/proxy/url_loader_resource.h
+++ b/ppapi/proxy/url_loader_resource.h
@@ -5,10 +5,13 @@
 #ifndef PPAPI_PROXY_URL_LOADER_RESOURCE_H_
 #define PPAPI_PROXY_URL_LOADER_RESOURCE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <deque>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/c/trusted/ppb_url_loader_trusted.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
diff --git a/ppapi/proxy/url_request_info_resource.h b/ppapi/proxy/url_request_info_resource.h
index 318668f..1ec7d13b 100644
--- a/ppapi/proxy/url_request_info_resource.h
+++ b/ppapi/proxy/url_request_info_resource.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PROXY_URL_REQUEST_INFO_RESOURCE_H_
 #define PPAPI_PROXY_URL_REQUEST_INFO_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/shared_impl/url_request_info_data.h"
diff --git a/ppapi/proxy/url_response_info_resource.cc b/ppapi/proxy/url_response_info_resource.cc
index 315b4a1..74370da 100644
--- a/ppapi/proxy/url_response_info_resource.cc
+++ b/ppapi/proxy/url_response_info_resource.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/url_response_info_resource.h"
 
+#include <stdint.h>
+
 #include "ppapi/proxy/file_ref_resource.h"
 #include "ppapi/shared_impl/var.h"
 #include "ppapi/thunk/enter.h"
diff --git a/ppapi/proxy/url_response_info_resource.h b/ppapi/proxy/url_response_info_resource.h
index e20417f..506b4d36 100644
--- a/ppapi/proxy/url_response_info_resource.h
+++ b/ppapi/proxy/url_response_info_resource.h
@@ -5,8 +5,8 @@
 #ifndef PPAPI_PROXY_URL_RESPONSE_INFO_RESOURCE_H_
 #define PPAPI_PROXY_URL_RESPONSE_INFO_RESOURCE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/shared_impl/scoped_pp_resource.h"
diff --git a/ppapi/proxy/video_capture_resource.cc b/ppapi/proxy/video_capture_resource.cc
index ca69d38..5189509 100644
--- a/ppapi/proxy/video_capture_resource.cc
+++ b/ppapi/proxy/video_capture_resource.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/video_capture_resource.h"
 
+#include <stddef.h>
+
 #include "ppapi/c/dev/ppp_video_capture_dev.h"
 #include "ppapi/proxy/dispatch_reply_message.h"
 #include "ppapi/proxy/plugin_dispatcher.h"
diff --git a/ppapi/proxy/video_capture_resource.h b/ppapi/proxy/video_capture_resource.h
index add9713..9b1a8a1 100644
--- a/ppapi/proxy/video_capture_resource.h
+++ b/ppapi/proxy/video_capture_resource.h
@@ -5,7 +5,10 @@
 #ifndef PPAPI_PROXY_VIDEO_CAPTURE_RESOURCE_H_
 #define PPAPI_PROXY_VIDEO_CAPTURE_RESOURCE_H_
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/c/dev/ppp_video_capture_dev.h"
 #include "ppapi/proxy/device_enumeration_resource_helper.h"
 #include "ppapi/proxy/plugin_resource.h"
diff --git a/ppapi/proxy/video_decoder_resource.h b/ppapi/proxy/video_decoder_resource.h
index bb630c4..8f66e4a 100644
--- a/ppapi/proxy/video_decoder_resource.h
+++ b/ppapi/proxy/video_decoder_resource.h
@@ -5,9 +5,12 @@
 #ifndef PPAPI_PROXY_VIDEO_DECODER_RESOURCE_H_
 #define PPAPI_PROXY_VIDEO_DECODER_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <queue>
 
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
diff --git a/ppapi/proxy/video_decoder_resource_unittest.cc b/ppapi/proxy/video_decoder_resource_unittest.cc
index 5a128d14..a8e3c4fb 100644
--- a/ppapi/proxy/video_decoder_resource_unittest.cc
+++ b/ppapi/proxy/video_decoder_resource_unittest.cc
@@ -3,9 +3,12 @@
 // found in the LICENSE file.
 
 #include <GLES2/gl2.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include "base/memory/shared_memory.h"
 #include "base/message_loop/message_loop.h"
+#include "build/build_config.h"
 #include "ppapi/c/pp_errors.h"
 #include "ppapi/c/ppb_video_decoder.h"
 #include "ppapi/proxy/locking_resource_releaser.h"
diff --git a/ppapi/proxy/video_destination_resource.h b/ppapi/proxy/video_destination_resource.h
index 2e545a3..a74450e 100644
--- a/ppapi/proxy/video_destination_resource.h
+++ b/ppapi/proxy/video_destination_resource.h
@@ -5,8 +5,11 @@
 #ifndef PPAPI_PROXY_VIDEO_DESTINATION_RESOURCE_H_
 #define PPAPI_PROXY_VIDEO_DESTINATION_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <string>
 
+#include "base/macros.h"
 #include "ppapi/c/pp_var.h"
 #include "ppapi/proxy/connection.h"
 #include "ppapi/proxy/plugin_resource.h"
diff --git a/ppapi/proxy/video_encoder_resource.h b/ppapi/proxy/video_encoder_resource.h
index 41f33c7..f040a38 100644
--- a/ppapi/proxy/video_encoder_resource.h
+++ b/ppapi/proxy/video_encoder_resource.h
@@ -5,8 +5,11 @@
 #ifndef PPAPI_PROXY_VIDEO_ENCODER_RESOURCE_H_
 #define PPAPI_PROXY_VIDEO_ENCODER_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <deque>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
diff --git a/ppapi/proxy/video_encoder_resource_unittest.cc b/ppapi/proxy/video_encoder_resource_unittest.cc
index 466a1ef..2b122e9 100644
--- a/ppapi/proxy/video_encoder_resource_unittest.cc
+++ b/ppapi/proxy/video_encoder_resource_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/video_encoder_resource.h"
 
+#include <stdint.h>
+
 #include <utility>
 
 #include "base/memory/shared_memory.h"
@@ -511,7 +513,7 @@
 
     ASSERT_EQ(profiles_response.size(), static_cast<uint32_t>(cb.result()));
 
-    for (uint32 i = 0; i < profiles_response.size(); i++) {
+    for (uint32_t i = 0; i < profiles_response.size(); i++) {
       ASSERT_EQ(profiles_response[i].profile, profiles[i].profile);
       ASSERT_EQ(profiles_response[i].max_resolution.width,
                 profiles[i].max_resolution.width);
diff --git a/ppapi/proxy/video_frame_resource.h b/ppapi/proxy/video_frame_resource.h
index e796eed..d82518bd 100644
--- a/ppapi/proxy/video_frame_resource.h
+++ b/ppapi/proxy/video_frame_resource.h
@@ -5,8 +5,10 @@
 #ifndef PPAPI_PROXY_VIDEO_FRAME_RESOURCE_H_
 #define PPAPI_PROXY_VIDEO_FRAME_RESOURCE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/proxy/ppapi_proxy_export.h"
 #include "ppapi/shared_impl/media_stream_buffer.h"
 #include "ppapi/shared_impl/resource.h"
diff --git a/ppapi/proxy/video_source_resource.h b/ppapi/proxy/video_source_resource.h
index 56cd7dd..bbc85b4 100644
--- a/ppapi/proxy/video_source_resource.h
+++ b/ppapi/proxy/video_source_resource.h
@@ -5,8 +5,11 @@
 #ifndef PPAPI_PROXY_VIDEO_SOURCE_RESOURCE_H_
 #define PPAPI_PROXY_VIDEO_SOURCE_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <string>
 
+#include "base/macros.h"
 #include "ppapi/c/pp_time.h"
 #include "ppapi/c/pp_var.h"
 #include "ppapi/proxy/connection.h"
diff --git a/ppapi/proxy/websocket_resource.cc b/ppapi/proxy/websocket_resource.cc
index b374ef3..02b918e3 100644
--- a/ppapi/proxy/websocket_resource.cc
+++ b/ppapi/proxy/websocket_resource.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/proxy/websocket_resource.h"
 
+#include <stddef.h>
+
 #include <limits>
 #include <set>
 #include <string>
@@ -273,7 +275,7 @@
     if (!message_arraybuffer.get())
       return PP_ERROR_BADARGUMENT;
     uint8_t* message_data = static_cast<uint8_t*>(message_arraybuffer->Map());
-    uint32 message_length = message_arraybuffer->ByteLength();
+    uint32_t message_length = message_arraybuffer->ByteLength();
     std::vector<uint8_t> message_vector(message_data,
                                         message_data + message_length);
     Post(RENDERER, PpapiHostMsg_WebSocket_SendBinary(message_vector));
diff --git a/ppapi/proxy/websocket_resource.h b/ppapi/proxy/websocket_resource.h
index 51fb52d..2cb43b8 100644
--- a/ppapi/proxy/websocket_resource.h
+++ b/ppapi/proxy/websocket_resource.h
@@ -5,8 +5,11 @@
 #ifndef PPAPI_PROXY_WEBSOCKET_RESOURCE_H_
 #define PPAPI_PROXY_WEBSOCKET_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <queue>
 
+#include "base/macros.h"
 #include "ppapi/c/ppb_websocket.h"
 #include "ppapi/proxy/plugin_resource.h"
 #include "ppapi/shared_impl/tracked_callback.h"
diff --git a/ppapi/proxy/websocket_resource_unittest.cc b/ppapi/proxy/websocket_resource_unittest.cc
index bdc0b885..9df1308 100644
--- a/ppapi/proxy/websocket_resource_unittest.cc
+++ b/ppapi/proxy/websocket_resource_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "base/memory/ref_counted.h"
 #include "base/message_loop/message_loop.h"
 #include "ppapi/c/pp_errors.h"