Switch to standard integer types in remoting/.

BUG=138542
[email protected]

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

Cr-Commit-Position: refs/heads/master@{#366684}
diff --git a/remoting/client/audio_decode_scheduler.cc b/remoting/client/audio_decode_scheduler.cc
index 144025ba..ac006dd 100644
--- a/remoting/client/audio_decode_scheduler.cc
+++ b/remoting/client/audio_decode_scheduler.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/single_thread_task_runner.h"
 #include "remoting/client/audio_player.h"
 #include "remoting/codec/audio_decoder.h"
diff --git a/remoting/client/audio_decode_scheduler.h b/remoting/client/audio_decode_scheduler.h
index 7848d67..a3c3c3b 100644
--- a/remoting/client/audio_decode_scheduler.h
+++ b/remoting/client/audio_decode_scheduler.h
@@ -5,6 +5,7 @@
 #ifndef REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_
 #define REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "remoting/protocol/audio_stub.h"
diff --git a/remoting/client/audio_player.cc b/remoting/client/audio_player.cc
index a26f1bc..7ae340c 100644
--- a/remoting/client/audio_player.cc
+++ b/remoting/client/audio_player.cc
@@ -80,7 +80,7 @@
 
 // static
 void AudioPlayer::AudioPlayerCallback(void* samples,
-                                      uint32 buffer_size,
+                                      uint32_t buffer_size,
                                       void* data) {
   AudioPlayer* audio_player = static_cast<AudioPlayer*>(data);
   audio_player->FillWithSamples(samples, buffer_size);
@@ -93,7 +93,7 @@
   bytes_consumed_ = 0;
 }
 
-void AudioPlayer::FillWithSamples(void* samples, uint32 buffer_size) {
+void AudioPlayer::FillWithSamples(void* samples, uint32_t buffer_size) {
   base::AutoLock auto_lock(lock_);
 
   const size_t bytes_needed = kChannels * kSampleSizeBytes *
diff --git a/remoting/client/audio_player.h b/remoting/client/audio_player.h
index e131737..94de1b4 100644
--- a/remoting/client/audio_player.h
+++ b/remoting/client/audio_player.h
@@ -5,8 +5,12 @@
 #ifndef REMOTING_CLIENT_AUDIO_PLAYER_H_
 #define REMOTING_CLIENT_AUDIO_PLAYER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <list>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
 #include "remoting/proto/audio.pb.h"
@@ -23,7 +27,7 @@
   AudioPlayer();
 
   // Return the recommended number of samples to include in a frame.
-  virtual uint32 GetSamplesPerFrame() = 0;
+  virtual uint32_t GetSamplesPerFrame() = 0;
 
   // Resets the audio player and starts playback.
   // Returns true on success.
@@ -31,7 +35,7 @@
 
   // Function called by the browser when it needs more audio samples.
   static void AudioPlayerCallback(void* samples,
-                                  uint32 buffer_size,
+                                  uint32_t buffer_size,
                                   void* data);
 
  private:
@@ -40,7 +44,7 @@
   typedef std::list<AudioPacket*> AudioPacketQueue;
 
   void ResetQueue();
-  void FillWithSamples(void* samples, uint32 buffer_size);
+  void FillWithSamples(void* samples, uint32_t buffer_size);
 
   AudioPacket::SamplingRate sampling_rate_;
 
diff --git a/remoting/client/audio_player_unittest.cc b/remoting/client/audio_player_unittest.cc
index 8084ee5..0e5381e 100644
--- a/remoting/client/audio_player_unittest.cc
+++ b/remoting/client/audio_player_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "remoting/client/audio_player.h"
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
 #include "base/memory/scoped_ptr.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -17,8 +19,8 @@
 
 // TODO(garykac): Generate random audio data in the tests rather than having
 // a single constant value.
-const uint8 kDefaultBufferData = 0x5A;
-const uint8 kDummyAudioData = 0x8B;
+const uint8_t kDefaultBufferData = 0x5A;
+const uint8_t kDummyAudioData = 0x8B;
 
 }  // namespace
 
@@ -31,7 +33,7 @@
 
   bool ResetAudioPlayer(AudioPacket::SamplingRate) override { return true; }
 
-  uint32 GetSamplesPerFrame() override { return kAudioSamplesPerFrame; }
+  uint32_t GetSamplesPerFrame() override { return kAudioSamplesPerFrame; }
 };
 
 class AudioPlayerTest : public ::testing::Test {
@@ -44,7 +46,7 @@
   void TearDown() override {}
 
   void ConsumeAudioFrame() {
-    uint8* buffer = reinterpret_cast<uint8*>(buffer_.get());
+    uint8_t* buffer = reinterpret_cast<uint8_t*>(buffer_.get());
     memset(buffer, kDefaultBufferData, kAudioFrameBytes + kPaddingBytes);
     AudioPlayer::AudioPlayerCallback(reinterpret_cast<void*>(buffer_.get()),
                                      kAudioFrameBytes,
@@ -57,7 +59,7 @@
   // Check that the first |num_bytes| bytes are filled with audio data and
   // the rest of the buffer is zero-filled.
   void CheckAudioFrameBytes(int num_bytes) {
-    uint8* buffer = reinterpret_cast<uint8*>(buffer_.get());
+    uint8_t* buffer = reinterpret_cast<uint8_t*>(buffer_.get());
     int i = 0;
     for (; i < num_bytes; i++) {
       ASSERT_EQ(kDummyAudioData, *(buffer + i));
diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h
index 9bcb929..1079018 100644
--- a/remoting/client/chromoting_client.h
+++ b/remoting/client/chromoting_client.h
@@ -10,6 +10,7 @@
 #include <string>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "remoting/protocol/client_stub.h"
 #include "remoting/protocol/clipboard_stub.h"
diff --git a/remoting/client/client_context.h b/remoting/client/client_context.h
index 56ae02e..49f05378 100644
--- a/remoting/client/client_context.h
+++ b/remoting/client/client_context.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/threading/thread.h"
 
 namespace base {
diff --git a/remoting/client/client_status_logger.h b/remoting/client/client_status_logger.h
index 4d15ac1..9f644c7 100644
--- a/remoting/client/client_status_logger.h
+++ b/remoting/client/client_status_logger.h
@@ -5,6 +5,7 @@
 #ifndef REMOTING_CLIENT_CLIENT_STATUS_LOGGER_H_
 #define REMOTING_CLIENT_CLIENT_STATUS_LOGGER_H_
 
+#include "base/macros.h"
 #include "base/threading/non_thread_safe.h"
 #include "base/time/time.h"
 #include "remoting/protocol/connection_to_host.h"
diff --git a/remoting/client/client_user_interface.h b/remoting/client/client_user_interface.h
index 59ad3ef..be578d2 100644
--- a/remoting/client/client_user_interface.h
+++ b/remoting/client/client_user_interface.h
@@ -7,7 +7,6 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/memory/scoped_ptr.h"
 #include "remoting/protocol/connection_to_host.h"
 #include "remoting/protocol/third_party_client_authenticator.h"
diff --git a/remoting/client/empty_cursor_filter.cc b/remoting/client/empty_cursor_filter.cc
index 085de580c8..9cb2fc9 100644
--- a/remoting/client/empty_cursor_filter.cc
+++ b/remoting/client/empty_cursor_filter.cc
@@ -4,8 +4,11 @@
 
 #include "remoting/client/empty_cursor_filter.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 
+#include "build/build_config.h"
 #include "remoting/proto/control.pb.h"
 
 namespace remoting {
diff --git a/remoting/client/empty_cursor_filter.h b/remoting/client/empty_cursor_filter.h
index ed14e5c..03eb347 100644
--- a/remoting/client/empty_cursor_filter.h
+++ b/remoting/client/empty_cursor_filter.h
@@ -5,6 +5,7 @@
 #ifndef REMOTING_CLIENT_EMPTY_CURSOR_FILTER_H_
 #define REMOTING_CLIENT_EMPTY_CURSOR_FILTER_H_
 
+#include "base/macros.h"
 #include "remoting/protocol/cursor_shape_stub.h"
 
 namespace remoting {
diff --git a/remoting/client/frame_consumer.h b/remoting/client/frame_consumer.h
index f3203561..792d2f6 100644
--- a/remoting/client/frame_consumer.h
+++ b/remoting/client/frame_consumer.h
@@ -5,7 +5,7 @@
 #ifndef REMOTING_CLIENT_FRAME_CONSUMER_H_
 #define REMOTING_CLIENT_FRAME_CONSUMER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 
 namespace webrtc {
 class DesktopFrame;
diff --git a/remoting/client/jni/android_keymap.cc b/remoting/client/jni/android_keymap.cc
index 7f5653e..2fc44b8 100644
--- a/remoting/client/jni/android_keymap.cc
+++ b/remoting/client/jni/android_keymap.cc
@@ -12,7 +12,7 @@
 // <android/keycodes.h> and
 // "ui/events/keycodes/keyboard_code_conversion_android.cc" . Some of these
 // mappings assume a US keyboard layout for now.
-const uint32 usb_keycodes[] = {
+const uint32_t usb_keycodes[] = {
   0,         // UNKNOWN
   0,         // SOFT_LEFT
   0,         // SOFT_RIGHT
@@ -203,8 +203,8 @@
 
 namespace remoting {
 
-uint32 AndroidKeycodeToUsbKeycode(size_t android) {
-  if (android >= sizeof (usb_keycodes) / sizeof (uint32)) {
+uint32_t AndroidKeycodeToUsbKeycode(size_t android) {
+  if (android >= sizeof(usb_keycodes) / sizeof(uint32_t)) {
     LOG(WARNING) << "Attempted to decode out-of-range Android keycode";
     return 0;
   }
diff --git a/remoting/client/jni/android_keymap.h b/remoting/client/jni/android_keymap.h
index 9368ae5..5cfe555a 100644
--- a/remoting/client/jni/android_keymap.h
+++ b/remoting/client/jni/android_keymap.h
@@ -5,7 +5,9 @@
 #ifndef REMOTING_CLIENT_JNI_ANDROID_KEYMAP_H_
 #define REMOTING_CLIENT_JNI_ANDROID_KEYMAP_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/memory/scoped_ptr.h"
 
 namespace remoting {
@@ -16,7 +18,7 @@
 // instead of the host's. The whole process needs to be rethought to accomplish
 // the mappings in a localizable and future-proof way.
 // crbug.com/265945
-uint32 AndroidKeycodeToUsbKeycode(size_t android);
+uint32_t AndroidKeycodeToUsbKeycode(size_t android);
 
 }  // namespace remoting
 
diff --git a/remoting/client/jni/chromoting_jni_instance.cc b/remoting/client/jni/chromoting_jni_instance.cc
index 535ca0f9..02a701ff 100644
--- a/remoting/client/jni/chromoting_jni_instance.cc
+++ b/remoting/client/jni/chromoting_jni_instance.cc
@@ -5,6 +5,7 @@
 #include "remoting/client/jni/chromoting_jni_instance.h"
 
 #include <android/log.h>
+#include <stdint.h>
 
 #include "base/bind.h"
 #include "base/logging.h"
diff --git a/remoting/client/jni/chromoting_jni_instance.h b/remoting/client/jni/chromoting_jni_instance.h
index c8ff15f..89e2bd2 100644
--- a/remoting/client/jni/chromoting_jni_instance.h
+++ b/remoting/client/jni/chromoting_jni_instance.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
diff --git a/remoting/client/jni/chromoting_jni_runtime.cc b/remoting/client/jni/chromoting_jni_runtime.cc
index 335e1ff..36b423c 100644
--- a/remoting/client/jni/chromoting_jni_runtime.cc
+++ b/remoting/client/jni/chromoting_jni_runtime.cc
@@ -9,7 +9,6 @@
 #include "base/android/jni_string.h"
 #include "base/android/library_loader/library_loader_hooks.h"
 #include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
 #include "base/command_line.h"
 #include "base/memory/singleton.h"
 #include "base/stl_util.h"
diff --git a/remoting/client/jni/chromoting_jni_runtime.h b/remoting/client/jni/chromoting_jni_runtime.h
index 5d622ac..d2d5e46 100644
--- a/remoting/client/jni/chromoting_jni_runtime.h
+++ b/remoting/client/jni/chromoting_jni_runtime.h
@@ -9,6 +9,7 @@
 #include <string>
 
 #include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
 #include "net/url_request/url_request_context_getter.h"
 #include "remoting/base/auto_thread.h"
 #include "remoting/client/jni/chromoting_jni_instance.h"
diff --git a/remoting/client/jni/jni_frame_consumer.cc b/remoting/client/jni/jni_frame_consumer.cc
index 8c84dba2..25923da 100644
--- a/remoting/client/jni/jni_frame_consumer.cc
+++ b/remoting/client/jni/jni_frame_consumer.cc
@@ -4,6 +4,8 @@
 
 #include "remoting/client/jni/jni_frame_consumer.h"
 
+#include <stdint.h>
+
 #include "base/android/jni_android.h"
 #include "base/android/scoped_java_ref.h"
 #include "base/logging.h"
@@ -67,7 +69,7 @@
   // and then the R/B channels are swapped in place (on the decoding thread).
   // If a repaint is triggered from a Java event handler, the unswapped pixels
   // can sometimes appear on the display.
-  uint8* dest_buffer = static_cast<uint8*>(bitmap_->pixels());
+  uint8_t* dest_buffer = static_cast<uint8_t*>(bitmap_->pixels());
   webrtc::DesktopRect buffer_rect =
       webrtc::DesktopRect::MakeSize(frame->size());
   for (webrtc::DesktopRegion::Iterator i(frame->updated_region()); !i.IsAtEnd();
diff --git a/remoting/client/jni/jni_frame_consumer.h b/remoting/client/jni/jni_frame_consumer.h
index 5a9f7e6..5c72e9b 100644
--- a/remoting/client/jni/jni_frame_consumer.h
+++ b/remoting/client/jni/jni_frame_consumer.h
@@ -8,6 +8,7 @@
 #include <list>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "remoting/client/frame_consumer.h"
diff --git a/remoting/client/jni/remoting_jni_onload.cc b/remoting/client/jni/remoting_jni_onload.cc
index b539747..2140e4a 100644
--- a/remoting/client/jni/remoting_jni_onload.cc
+++ b/remoting/client/jni/remoting_jni_onload.cc
@@ -8,6 +8,7 @@
 #include "base/android/jni_registrar.h"
 #include "base/android/jni_utils.h"
 #include "base/bind.h"
+#include "base/macros.h"
 #include "net/android/net_jni_registrar.h"
 #include "remoting/client/jni/remoting_jni_registrar.h"
 #include "ui/gfx/android/gfx_jni_registrar.h"
diff --git a/remoting/client/key_event_mapper.cc b/remoting/client/key_event_mapper.cc
index c6e5958..85bda275 100644
--- a/remoting/client/key_event_mapper.cc
+++ b/remoting/client/key_event_mapper.cc
@@ -21,7 +21,7 @@
   trap_callback = callback;
 }
 
-void KeyEventMapper::TrapKey(uint32 usb_keycode, bool trap_key) {
+void KeyEventMapper::TrapKey(uint32_t usb_keycode, bool trap_key) {
   if (trap_key) {
     trapped_keys.insert(usb_keycode);
   } else {
@@ -29,7 +29,8 @@
   }
 }
 
-void KeyEventMapper::RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode) {
+void KeyEventMapper::RemapKey(uint32_t in_usb_keycode,
+                              uint32_t out_usb_keycode) {
   if (in_usb_keycode == out_usb_keycode) {
     mapped_keys.erase(in_usb_keycode);
   } else {
@@ -47,7 +48,7 @@
     }
 
     // Re-map mapped keys to the new value before passing them on.
-    std::map<uint32,uint32>::iterator mapped =
+    std::map<uint32_t, uint32_t>::iterator mapped =
         mapped_keys.find(event.usb_keycode());
     if (mapped != mapped_keys.end()) {
       protocol::KeyEvent new_event(event);
diff --git a/remoting/client/key_event_mapper.h b/remoting/client/key_event_mapper.h
index b81c6570..f500e27 100644
--- a/remoting/client/key_event_mapper.h
+++ b/remoting/client/key_event_mapper.h
@@ -5,12 +5,14 @@
 #ifndef REMOTING_CLIENT_KEY_EVENT_MAPPER_H_
 #define REMOTING_CLIENT_KEY_EVENT_MAPPER_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <set>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "remoting/protocol/input_filter.h"
 
 namespace remoting {
@@ -32,18 +34,18 @@
 
   // Causes events matching |usb_keycode| to be delivered to the trap callback.
   // Trapped events are not dispatched to the next InputStub in the chain.
-  void TrapKey(uint32 usb_keycode, bool trap_key);
+  void TrapKey(uint32_t usb_keycode, bool trap_key);
 
   // Causes events matching |in_usb_keycode| to be mapped to |out_usb_keycode|.
   // Keys are remapped at most once. Traps are processed before remapping.
-  void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode);
+  void RemapKey(uint32_t in_usb_keycode, uint32_t out_usb_keycode);
 
   // InputFilter overrides.
   void InjectKeyEvent(const protocol::KeyEvent& event) override;
 
  private:
-  std::map<uint32,uint32> mapped_keys;
-  std::set<uint32> trapped_keys;
+  std::map<uint32_t, uint32_t> mapped_keys;
+  std::set<uint32_t> trapped_keys;
   KeyTrapCallback trap_callback;
 
   DISALLOW_COPY_AND_ASSIGN(KeyEventMapper);
diff --git a/remoting/client/key_event_mapper_unittest.cc b/remoting/client/key_event_mapper_unittest.cc
index b194038..26715f5 100644
--- a/remoting/client/key_event_mapper_unittest.cc
+++ b/remoting/client/key_event_mapper_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "remoting/client/key_event_mapper.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "remoting/proto/event.pb.h"
 #include "remoting/protocol/protocol_mock_objects.h"
@@ -22,9 +24,9 @@
 using protocol::MockInputStub;
 using protocol::test::EqualsKeyEventWithCapsLock;
 
-static KeyEvent NewUsbEvent(uint32 usb_keycode,
+static KeyEvent NewUsbEvent(uint32_t usb_keycode,
                             bool pressed,
-                            uint32 lock_states) {
+                            uint32_t lock_states) {
   KeyEvent event;
   event.set_usb_keycode(usb_keycode);
   event.set_pressed(pressed);
@@ -33,7 +35,7 @@
   return event;
 }
 
-static void PressAndReleaseUsb(InputStub* input_stub, uint32 usb_keycode) {
+static void PressAndReleaseUsb(InputStub* input_stub, uint32_t usb_keycode) {
   input_stub->InjectKeyEvent(
       NewUsbEvent(usb_keycode, true, KeyEvent::LOCK_STATES_CAPSLOCK));
   input_stub->InjectKeyEvent(
diff --git a/remoting/client/normalizing_input_filter_cros.h b/remoting/client/normalizing_input_filter_cros.h
index 0dfa805..98661945 100644
--- a/remoting/client/normalizing_input_filter_cros.h
+++ b/remoting/client/normalizing_input_filter_cros.h
@@ -5,6 +5,9 @@
 #ifndef REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_CROS_H_
 #define REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_CROS_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "remoting/proto/event.pb.h"
 #include "remoting/protocol/input_filter.h"
 
@@ -49,7 +52,7 @@
   bool deferred_key_is_rewriting_;
 
   // Stores the code of the OSKey while it is pressed for use as a Modifier.
-  uint32 modifying_key_;
+  uint32_t modifying_key_;
 
   // True if the left or right Alt keys are pressed, respectively.
   bool left_alt_is_pressed_;
diff --git a/remoting/client/normalizing_input_filter_cros_unittest.cc b/remoting/client/normalizing_input_filter_cros_unittest.cc
index be89a27e..e0e4f7f1 100644
--- a/remoting/client/normalizing_input_filter_cros_unittest.cc
+++ b/remoting/client/normalizing_input_filter_cros_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "remoting/client/normalizing_input_filter_cros.h"
 
+#include <stdint.h>
+
 #include "remoting/proto/event.pb.h"
 #include "remoting/protocol/protocol_mock_objects.h"
 #include "remoting/protocol/test_event_matchers.h"
diff --git a/remoting/client/normalizing_input_filter_mac.h b/remoting/client/normalizing_input_filter_mac.h
index 26636ad..1271cf32 100644
--- a/remoting/client/normalizing_input_filter_mac.h
+++ b/remoting/client/normalizing_input_filter_mac.h
@@ -7,6 +7,7 @@
 
 #include <map>
 
+#include "base/macros.h"
 #include "remoting/protocol/input_filter.h"
 
 namespace remoting {
diff --git a/remoting/client/normalizing_input_filter_mac_unittest.cc b/remoting/client/normalizing_input_filter_mac_unittest.cc
index e29c705..9c637e5 100644
--- a/remoting/client/normalizing_input_filter_mac_unittest.cc
+++ b/remoting/client/normalizing_input_filter_mac_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "remoting/client/normalizing_input_filter_mac.h"
 
+#include <stdint.h>
+
 #include "remoting/proto/event.pb.h"
 #include "remoting/protocol/protocol_mock_objects.h"
 #include "remoting/protocol/test_event_matchers.h"
diff --git a/remoting/client/normalizing_input_filter_win.cc b/remoting/client/normalizing_input_filter_win.cc
index 20950da0..2fca242 100644
--- a/remoting/client/normalizing_input_filter_win.cc
+++ b/remoting/client/normalizing_input_filter_win.cc
@@ -4,6 +4,8 @@
 
 #include "remoting/client/normalizing_input_filter_win.h"
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "ui/events/keycodes/dom/dom_code.h"
 
diff --git a/remoting/client/normalizing_input_filter_win_unittest.cc b/remoting/client/normalizing_input_filter_win_unittest.cc
index cb96b3f5..ee8ec3c 100644
--- a/remoting/client/normalizing_input_filter_win_unittest.cc
+++ b/remoting/client/normalizing_input_filter_win_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 "remoting/client/normalizing_input_filter_win.h"
 #include "remoting/proto/event.pb.h"
 #include "remoting/protocol/protocol_mock_objects.h"
@@ -23,14 +25,14 @@
 const unsigned int kUsbRightAlt = 0x0700e6;
 
 // A hardcoded value used to verify |lock_states| is preserved.
-static const uint32 kTestLockStates = protocol::KeyEvent::LOCK_STATES_NUMLOCK;
+static const uint32_t kTestLockStates = protocol::KeyEvent::LOCK_STATES_NUMLOCK;
 
 MATCHER_P2(EqualsKeyEvent, usb_keycode, pressed, "") {
-  return arg.usb_keycode() == static_cast<uint32>(usb_keycode) &&
+  return arg.usb_keycode() == static_cast<uint32_t>(usb_keycode) &&
          arg.pressed() == pressed && arg.lock_states() == kTestLockStates;
 }
 
-KeyEvent MakeKeyEvent(uint32 keycode, bool pressed) {
+KeyEvent MakeKeyEvent(uint32_t keycode, bool pressed) {
   KeyEvent event;
   event.set_usb_keycode(keycode);
   event.set_pressed(pressed);
@@ -38,7 +40,7 @@
   return event;
 }
 
-void PressAndReleaseKey(InputStub* input_stub, uint32 keycode) {
+void PressAndReleaseKey(InputStub* input_stub, uint32_t keycode) {
   input_stub->InjectKeyEvent(MakeKeyEvent(keycode, true));
   input_stub->InjectKeyEvent(MakeKeyEvent(keycode, false));
 }
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 5f71ccd..1c23317 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -1032,7 +1032,7 @@
   PostMessage(pp::Var(message_json));
 }
 
-void ChromotingInstance::SendTrappedKey(uint32 usb_keycode, bool pressed) {
+void ChromotingInstance::SendTrappedKey(uint32_t usb_keycode, bool pressed) {
   scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
   data->SetInteger("usbKeycode", usb_keycode);
   data->SetBoolean("pressed", pressed);
@@ -1131,7 +1131,7 @@
 
 void ChromotingInstance::UpdateUmaEnumHistogram(
     const std::string& histogram_name,
-    int64 value,
+    int64_t value,
     int histogram_max) {
   pp::UMAPrivate uma(this);
   uma.HistogramEnumeration(histogram_name, value, histogram_max);
@@ -1140,7 +1140,7 @@
 void ChromotingInstance::UpdateUmaCustomHistogram(
     bool is_custom_counts_histogram,
     const std::string& histogram_name,
-    int64 value,
+    int64_t value,
     int histogram_min,
     int histogram_max,
     int histogram_buckets) {
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index 9339ded0..9eba3d1 100644
--- a/remoting/client/plugin/chromoting_instance.h
+++ b/remoting/client/plugin/chromoting_instance.h
@@ -5,8 +5,12 @@
 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/thread_task_runner_handle.h"
@@ -165,14 +169,14 @@
 
   // Updates the specified UMA enumeration histogram with the input value.
   void UpdateUmaEnumHistogram(const std::string& histogram_name,
-                              int64 value,
+                              int64_t value,
                               int histogram_max);
 
   // Updates the specified UMA custom counts or custom times histogram with the
   // input value.
   void UpdateUmaCustomHistogram(bool is_custom_counts_histogram,
                                 const std::string& histogram_name,
-                                int64 value,
+                                int64_t value,
                                 int histogram_min,
                                 int histogram_max,
                                 int histogram_buckets);
@@ -224,7 +228,7 @@
                              scoped_ptr<base::DictionaryValue> data);
 
   // Posts trapped keys to the web-app to handle.
-  void SendTrappedKey(uint32 usb_keycode, bool pressed);
+  void SendTrappedKey(uint32_t usb_keycode, bool pressed);
 
   // Callback for DelegatingSignalStrategy.
   void SendOutgoingIq(const std::string& iq);
diff --git a/remoting/client/plugin/delegating_signal_strategy.h b/remoting/client/plugin/delegating_signal_strategy.h
index 94a3190..6f87856 100644
--- a/remoting/client/plugin/delegating_signal_strategy.h
+++ b/remoting/client/plugin/delegating_signal_strategy.h
@@ -6,6 +6,7 @@
 #define REMOTING_CLIENT_PLUGIN_DELEGATING_SIGNAL_STRATEGY_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "remoting/signaling/signal_strategy.h"
 
diff --git a/remoting/client/plugin/pepper_address_resolver.h b/remoting/client/plugin/pepper_address_resolver.h
index ae8fd190..c130751 100644
--- a/remoting/client/plugin/pepper_address_resolver.h
+++ b/remoting/client/plugin/pepper_address_resolver.h
@@ -5,6 +5,8 @@
 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_ADDRESS_RESOLVER_H_
 #define REMOTING_CLIENT_PLUGIN_PEPPER_ADDRESS_RESOLVER_H_
 
+#include <stdint.h>
+
 #include "base/macros.h"
 #include "ppapi/cpp/host_resolver.h"
 #include "ppapi/utility/completion_callback_factory.h"
diff --git a/remoting/client/plugin/pepper_audio_player.cc b/remoting/client/plugin/pepper_audio_player.cc
index 4b1f02a0..90e83b54 100644
--- a/remoting/client/plugin/pepper_audio_player.cc
+++ b/remoting/client/plugin/pepper_audio_player.cc
@@ -22,7 +22,7 @@
 PepperAudioPlayer::~PepperAudioPlayer() {
 }
 
-uint32 PepperAudioPlayer::GetSamplesPerFrame() {
+uint32_t PepperAudioPlayer::GetSamplesPerFrame() {
   return samples_per_frame_;
 }
 
diff --git a/remoting/client/plugin/pepper_audio_player.h b/remoting/client/plugin/pepper_audio_player.h
index dcf2c6b8..eef697c 100644
--- a/remoting/client/plugin/pepper_audio_player.h
+++ b/remoting/client/plugin/pepper_audio_player.h
@@ -5,7 +5,10 @@
 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_AUDIO_PLAYER_H_
 #define REMOTING_CLIENT_PLUGIN_PEPPER_AUDIO_PLAYER_H_
 
+#include <stdint.h>
+
 #include "base/callback.h"
+#include "base/macros.h"
 #include "ppapi/cpp/audio.h"
 #include "ppapi/cpp/instance.h"
 #include "remoting/client/audio_player.h"
@@ -18,7 +21,7 @@
   explicit PepperAudioPlayer(pp::Instance* instance);
   ~PepperAudioPlayer() override;
 
-  uint32 GetSamplesPerFrame() override;
+  uint32_t GetSamplesPerFrame() override;
 
   bool ResetAudioPlayer(AudioPacket::SamplingRate sampling_rate) override;
 
@@ -27,7 +30,7 @@
   pp::Audio audio_;
 
   // The count of sample frames per channel in an audio buffer.
-  uint32 samples_per_frame_;
+  uint32_t samples_per_frame_;
 
   DISALLOW_COPY_AND_ASSIGN(PepperAudioPlayer);
 };
diff --git a/remoting/client/plugin/pepper_cursor_setter.cc b/remoting/client/plugin/pepper_cursor_setter.cc
index 3d1effd1..2e1a919 100644
--- a/remoting/client/plugin/pepper_cursor_setter.cc
+++ b/remoting/client/plugin/pepper_cursor_setter.cc
@@ -4,6 +4,8 @@
 
 #include "remoting/client/plugin/pepper_cursor_setter.h"
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "ppapi/cpp/image_data.h"
 #include "ppapi/cpp/mouse_cursor.h"
@@ -66,7 +68,7 @@
   const uint32_t* src_row_data = reinterpret_cast<const uint32_t*>(
       cursor_shape.data().data());
   const int bytes_per_row = size.width() * kBytesPerPixel;
-  uint8* dst_row_data = reinterpret_cast<uint8*>(image.data());
+  uint8_t* dst_row_data = reinterpret_cast<uint8_t*>(image.data());
   for (int row = 0; row < size.height(); row++) {
     memcpy(dst_row_data, src_row_data, bytes_per_row);
     src_row_data += size.width();
diff --git a/remoting/client/plugin/pepper_cursor_setter.h b/remoting/client/plugin/pepper_cursor_setter.h
index 1989599..daff3a52 100644
--- a/remoting/client/plugin/pepper_cursor_setter.h
+++ b/remoting/client/plugin/pepper_cursor_setter.h
@@ -5,6 +5,7 @@
 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_CURSOR_SETTER_H_
 #define REMOTING_CLIENT_PLUGIN_PEPPER_CURSOR_SETTER_H_
 
+#include "base/macros.h"
 #include "ppapi/cpp/instance_handle.h"
 #include "remoting/protocol/cursor_shape_stub.h"
 
diff --git a/remoting/client/plugin/pepper_input_handler.cc b/remoting/client/plugin/pepper_input_handler.cc
index 1621949..c25c566 100644
--- a/remoting/client/plugin/pepper_input_handler.cc
+++ b/remoting/client/plugin/pepper_input_handler.cc
@@ -4,6 +4,8 @@
 
 #include "remoting/client/plugin/pepper_input_handler.h"
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "ppapi/cpp/image_data.h"
 #include "ppapi/cpp/input_event.h"
diff --git a/remoting/client/plugin/pepper_input_handler.h b/remoting/client/plugin/pepper_input_handler.h
index 0218e5f9..3c00221 100644
--- a/remoting/client/plugin/pepper_input_handler.h
+++ b/remoting/client/plugin/pepper_input_handler.h
@@ -5,6 +5,7 @@
 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_
 #define REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 
 namespace pp {
diff --git a/remoting/client/plugin/pepper_main_thread_task_runner.h b/remoting/client/plugin/pepper_main_thread_task_runner.h
index a6e839a..9b5c8e8 100644
--- a/remoting/client/plugin/pepper_main_thread_task_runner.h
+++ b/remoting/client/plugin/pepper_main_thread_task_runner.h
@@ -5,6 +5,8 @@
 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_
 #define REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_
 
+#include <stdint.h>
+
 #include "base/callback_forward.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
diff --git a/remoting/client/plugin/pepper_mouse_locker.h b/remoting/client/plugin/pepper_mouse_locker.h
index 9eb30cb..5e54dd2 100644
--- a/remoting/client/plugin/pepper_mouse_locker.h
+++ b/remoting/client/plugin/pepper_mouse_locker.h
@@ -6,6 +6,7 @@
 #define REMOTING_CLIENT_PLUGIN_PEPPER_MOUSE_LOCKER_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "ppapi/cpp/mouse_lock.h"
 #include "ppapi/utility/completion_callback_factory.h"
diff --git a/remoting/client/plugin/pepper_network_manager.cc b/remoting/client/plugin/pepper_network_manager.cc
index b019320..2d6ab1c 100644
--- a/remoting/client/plugin/pepper_network_manager.cc
+++ b/remoting/client/plugin/pepper_network_manager.cc
@@ -4,6 +4,8 @@
 
 #include "remoting/client/plugin/pepper_network_manager.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/single_thread_task_runner.h"
diff --git a/remoting/client/plugin/pepper_network_manager.h b/remoting/client/plugin/pepper_network_manager.h
index c761d3a6..0907a530 100644
--- a/remoting/client/plugin/pepper_network_manager.h
+++ b/remoting/client/plugin/pepper_network_manager.h
@@ -5,6 +5,8 @@
 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_NETWORK_MANAGER_H_
 #define REMOTING_CLIENT_PLUGIN_PEPPER_NETWORK_MANAGER_H_
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
 #include "base/memory/weak_ptr.h"
 #include "ppapi/cpp/instance_handle.h"
diff --git a/remoting/client/plugin/pepper_packet_socket_factory.cc b/remoting/client/plugin/pepper_packet_socket_factory.cc
index b8a1249..9735d013 100644
--- a/remoting/client/plugin/pepper_packet_socket_factory.cc
+++ b/remoting/client/plugin/pepper_packet_socket_factory.cc
@@ -4,8 +4,11 @@
 
 #include "remoting/client/plugin/pepper_packet_socket_factory.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "net/base/io_buffer.h"
 #include "net/base/net_errors.h"
 #include "ppapi/cpp/net_address.h"
@@ -91,8 +94,8 @@
   // |min_port| and |max_port| are set to zero if the port number
   // should be assigned by the OS.
   bool Init(const rtc::SocketAddress& local_address,
-            uint16 min_port,
-            uint16 max_port);
+            uint16_t min_port,
+            uint16_t max_port);
 
   // rtc::AsyncPacketSocket interface.
   rtc::SocketAddress GetLocalAddress() const override;
@@ -183,8 +186,8 @@
 }
 
 bool UdpPacketSocket::Init(const rtc::SocketAddress& local_address,
-                           uint16 min_port,
-                           uint16 max_port) {
+                           uint16_t min_port,
+                           uint16_t max_port) {
   if (socket_.is_null()) {
     return false;
   }
@@ -408,9 +411,9 @@
 }
 
 rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateUdpSocket(
-      const rtc::SocketAddress& local_address,
-      uint16 min_port,
-      uint16 max_port) {
+    const rtc::SocketAddress& local_address,
+    uint16_t min_port,
+    uint16_t max_port) {
   scoped_ptr<UdpPacketSocket> result(new UdpPacketSocket(pp_instance_));
   if (!result->Init(local_address, min_port, max_port))
     return nullptr;
@@ -419,8 +422,8 @@
 
 rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateServerTcpSocket(
     const rtc::SocketAddress& local_address,
-    uint16 min_port,
-    uint16 max_port,
+    uint16_t min_port,
+    uint16_t max_port,
     int opts) {
   // We don't use TCP sockets for remoting connections.
   NOTREACHED();
diff --git a/remoting/client/plugin/pepper_packet_socket_factory.h b/remoting/client/plugin/pepper_packet_socket_factory.h
index d355ff3..c1f001a 100644
--- a/remoting/client/plugin/pepper_packet_socket_factory.h
+++ b/remoting/client/plugin/pepper_packet_socket_factory.h
@@ -5,7 +5,8 @@
 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_PACKET_SOCKET_FACTORY_H_
 #define REMOTING_CLIENT_PLUGIN_PEPPER_PACKET_SOCKET_FACTORY_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "ppapi/cpp/instance_handle.h"
@@ -20,12 +21,12 @@
 
   rtc::AsyncPacketSocket* CreateUdpSocket(
       const rtc::SocketAddress& local_address,
-      uint16 min_port,
-      uint16 max_port) override;
+      uint16_t min_port,
+      uint16_t max_port) override;
   rtc::AsyncPacketSocket* CreateServerTcpSocket(
       const rtc::SocketAddress& local_address,
-      uint16 min_port,
-      uint16 max_port,
+      uint16_t min_port,
+      uint16_t max_port,
       int opts) override;
   rtc::AsyncPacketSocket* CreateClientTcpSocket(
       const rtc::SocketAddress& local_address,
diff --git a/remoting/client/plugin/pepper_port_allocator.cc b/remoting/client/plugin/pepper_port_allocator.cc
index 11fee075..0b24341 100644
--- a/remoting/client/plugin/pepper_port_allocator.cc
+++ b/remoting/client/plugin/pepper_port_allocator.cc
@@ -4,7 +4,10 @@
 
 #include "remoting/client/plugin/pepper_port_allocator.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/strings/string_number_conversions.h"
 #include "net/base/net_util.h"
 #include "ppapi/c/pp_errors.h"
diff --git a/remoting/client/plugin/pepper_port_allocator.h b/remoting/client/plugin/pepper_port_allocator.h
index 76d447b..137a0d8 100644
--- a/remoting/client/plugin/pepper_port_allocator.h
+++ b/remoting/client/plugin/pepper_port_allocator.h
@@ -6,6 +6,7 @@
 #define REMOTING_CLIENT_PLUGIN_PEPPER_PORT_ALLOCATOR_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "ppapi/cpp/instance_handle.h"
 #include "remoting/protocol/port_allocator_factory.h"
diff --git a/remoting/client/plugin/pepper_video_renderer_2d.cc b/remoting/client/plugin/pepper_video_renderer_2d.cc
index afb2e76b..204fdc8 100644
--- a/remoting/client/plugin/pepper_video_renderer_2d.cc
+++ b/remoting/client/plugin/pepper_video_renderer_2d.cc
@@ -4,6 +4,8 @@
 
 #include "remoting/client/plugin/pepper_video_renderer_2d.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/strings/string_util.h"
diff --git a/remoting/client/plugin/pepper_video_renderer_2d.h b/remoting/client/plugin/pepper_video_renderer_2d.h
index 1e592790..6a17f4d 100644
--- a/remoting/client/plugin/pepper_video_renderer_2d.h
+++ b/remoting/client/plugin/pepper_video_renderer_2d.h
@@ -8,6 +8,7 @@
 #include <list>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_vector.h"
 #include "base/memory/weak_ptr.h"
diff --git a/remoting/client/plugin/pepper_video_renderer_3d.h b/remoting/client/plugin/pepper_video_renderer_3d.h
index 2c229b6a5..414cffa6 100644
--- a/remoting/client/plugin/pepper_video_renderer_3d.h
+++ b/remoting/client/plugin/pepper_video_renderer_3d.h
@@ -5,11 +5,13 @@
 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_
 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_
 
+#include <stdint.h>
+
 #include <deque>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "ppapi/cpp/graphics_3d.h"
 #include "ppapi/cpp/instance_handle.h"
diff --git a/remoting/client/software_video_renderer.h b/remoting/client/software_video_renderer.h
index 5158e9d..d67e3e5b 100644
--- a/remoting/client/software_video_renderer.h
+++ b/remoting/client/software_video_renderer.h
@@ -5,6 +5,9 @@
 #ifndef REMOTING_CLIENT_SOFTWARE_VIDEO_RENDERER_H_
 #define REMOTING_CLIENT_SOFTWARE_VIDEO_RENDERER_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
diff --git a/remoting/client/software_video_renderer_unittest.cc b/remoting/client/software_video_renderer_unittest.cc
index 6444fdc..9a36d72 100644
--- a/remoting/client/software_video_renderer_unittest.cc
+++ b/remoting/client/software_video_renderer_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "remoting/client/software_video_renderer.h"
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/bind.h"
diff --git a/remoting/client/token_fetcher_proxy.h b/remoting/client/token_fetcher_proxy.h
index e71aa046..17916ce 100644
--- a/remoting/client/token_fetcher_proxy.h
+++ b/remoting/client/token_fetcher_proxy.h
@@ -6,6 +6,7 @@
 #define REMOTING_CLIENT_TOKEN_FETCHER_PROXY_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "remoting/protocol/third_party_client_authenticator.h"
 
diff --git a/remoting/client/touch_input_scaler.h b/remoting/client/touch_input_scaler.h
index b9c93e8..290309f 100644
--- a/remoting/client/touch_input_scaler.h
+++ b/remoting/client/touch_input_scaler.h
@@ -5,6 +5,7 @@
 #ifndef REMOTING_CLIENT_TOUCH_INPUT_SCALER_H_
 #define REMOTING_CLIENT_TOUCH_INPUT_SCALER_H_
 
+#include "base/macros.h"
 #include "remoting/protocol/input_filter.h"
 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
 
diff --git a/remoting/client/touch_input_scaler_unittest.cc b/remoting/client/touch_input_scaler_unittest.cc
index 2e779f1..e36e43e1 100644
--- a/remoting/client/touch_input_scaler_unittest.cc
+++ b/remoting/client/touch_input_scaler_unittest.cc
@@ -4,8 +4,11 @@
 
 #include "remoting/client/touch_input_scaler.h"
 
+#include <stdint.h>
+
 #include <cmath>
 
+#include "base/macros.h"
 #include "remoting/protocol/protocol_mock_objects.h"
 #include "remoting/protocol/test_event_matchers.h"
 #include "testing/gmock/include/gmock/gmock.h"