diff options
author | avi <avi@chromium.org> | 2015-12-21 12:46:52 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-21 20:47:59 +0000 |
commit | 512186a7613d5d499bce19b45c8d0264e9c18448 (patch) | |
tree | f1f91e4d1743ca77257b13352a94b4aa88c3dda5 /win8 | |
parent | b2615229259c4cffdeb37efa4f2422b6624e9c07 (diff) | |
download | chromium_src-512186a7613d5d499bce19b45c8d0264e9c18448.zip chromium_src-512186a7613d5d499bce19b45c8d0264e9c18448.tar.gz chromium_src-512186a7613d5d499bce19b45c8d0264e9c18448.tar.bz2 |
Switch to standard integer types in win8/.
BUG=138542
TBR=cpu@chromium.org
Review URL: https://codereview.chromium.org/1540973003
Cr-Commit-Position: refs/heads/master@{#366452}
Diffstat (limited to 'win8')
30 files changed, 135 insertions, 104 deletions
diff --git a/win8/delegate_execute/chrome_util.cc b/win8/delegate_execute/chrome_util.cc index 247bb58..0a4e177 100644 --- a/win8/delegate_execute/chrome_util.cc +++ b/win8/delegate_execute/chrome_util.cc @@ -7,6 +7,7 @@ #include <windows.h> #include <atlbase.h> #include <shlobj.h> +#include <stddef.h> #include <algorithm> #include <limits> @@ -14,6 +15,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/md5.h" #include "base/process/kill.h" #include "base/process/launch.h" diff --git a/win8/delegate_execute/delegate_execute_operation.cc b/win8/delegate_execute/delegate_execute_operation.cc index ce64680..152e9a1 100644 --- a/win8/delegate_execute/delegate_execute_operation.cc +++ b/win8/delegate_execute/delegate_execute_operation.cc @@ -4,6 +4,8 @@ #include "win8/delegate_execute/delegate_execute_operation.h" +#include <stdint.h> + #include "base/command_line.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" @@ -57,7 +59,7 @@ base::Process DelegateExecuteOperation::GetParent() const { if (parts.size() != 3) return base::Process(); DWORD pid; - if (!base::StringToUint(parts[2], reinterpret_cast<uint32*>(&pid))) + if (!base::StringToUint(parts[2], reinterpret_cast<uint32_t*>(&pid))) return base::Process(); return base::Process::Open(pid); } diff --git a/win8/delegate_execute/delegate_execute_operation.h b/win8/delegate_execute/delegate_execute_operation.h index 3dbc702..821515b 100644 --- a/win8/delegate_execute/delegate_execute_operation.h +++ b/win8/delegate_execute/delegate_execute_operation.h @@ -8,8 +8,8 @@ #include <windows.h> #include <atldef.h> -#include "base/basictypes.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/process/process.h" #include "base/strings/string16.h" diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc index 15158dd..2615ba6 100644 --- a/win8/metro_driver/chrome_app_view_ash.cc +++ b/win8/metro_driver/chrome_app_view_ash.cc @@ -7,11 +7,13 @@ #include <corewindow.h> #include <shellapi.h> +#include <stdint.h> #include <windows.foundation.h> #include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/path_service.h" #include "base/single_thread_task_runner.h" @@ -207,7 +209,7 @@ class ChromeChannelListener : public IPC::Listener { base::Unretained(app_view_), shortcut, url)); } - void OnSetCursor(int64 cursor) { + void OnSetCursor(int64_t cursor) { ui_task_runner_->PostTask( FROM_HERE, base::Bind(&ChromeAppViewAsh::OnSetCursor, base::Unretained(app_view_), @@ -251,7 +253,7 @@ class ChromeChannelListener : public IPC::Listener { } void OnImeTextInputClientChanged( - const std::vector<int32>& input_scopes, + const std::vector<int32_t>& input_scopes, const std::vector<metro_viewer::CharacterBounds>& character_bounds) { ui_task_runner_->PostTask( FROM_HERE, base::Bind(&ChromeAppViewAsh::OnImeUpdateTextInputClient, @@ -282,8 +284,8 @@ void RunMessageLoop(winui::Core::ICoreDispatcher* dispatcher) { } // Helper to return the state of the shift/control/alt keys. -uint32 GetKeyboardEventFlags() { - uint32 flags = 0; +uint32_t GetKeyboardEventFlags() { + uint32_t flags = 0; if (ui::win::IsShiftPressed()) flags |= ui::EF_SHIFT_DOWN; if (ui::win::IsCtrlPressed()) @@ -440,9 +442,7 @@ class ChromeAppViewAsh::PointerInfoHandler { return IsType(windevs::Input::PointerDeviceType_Touch); } - int32 wheel_delta() const { - return wheel_delta_; - } + int32_t wheel_delta() const { return wheel_delta_; } // Identifies the button that changed. ui::EventFlags changed_button() const { @@ -464,16 +464,14 @@ class ChromeAppViewAsh::PointerInfoHandler { } } - uint32 mouse_down_flags() const { return mouse_down_flags_; } + uint32_t mouse_down_flags() const { return mouse_down_flags_; } int x() const { return x_; } int y() const { return y_; } - uint32 pointer_id() const { - return pointer_id_; - } + uint32_t pointer_id() const { return pointer_id_; } - uint64 timestamp() const { return timestamp_; } + uint64_t timestamp() const { return timestamp_; } winui::Input::PointerUpdateKind update_kind() const { return update_kind_; } @@ -483,14 +481,14 @@ class ChromeAppViewAsh::PointerInfoHandler { int x_; int y_; int wheel_delta_; - uint32 pointer_id_; + uint32_t pointer_id_; winui::Input::PointerUpdateKind update_kind_; mswr::ComPtr<winui::Input::IPointerPoint> pointer_point_; - uint64 timestamp_; + uint64_t timestamp_; // Bitmask of ui::EventFlags corresponding to the buttons that are currently // down. - uint32 mouse_down_flags_; + uint32_t mouse_down_flags_; // Set to true for a horizontal wheel message. boolean is_horizontal_wheel_; @@ -875,7 +873,7 @@ void ChromeAppViewAsh::OnImeCancelComposition() { } void ChromeAppViewAsh::OnImeUpdateTextInputClient( - const std::vector<int32>& input_scopes, + const std::vector<int32_t>& input_scopes, const std::vector<metro_viewer::CharacterBounds>& character_bounds) { if (!text_service_) return; @@ -947,8 +945,8 @@ void ChromeAppViewAsh::OnInputSourceChanged() { void ChromeAppViewAsh::OnCompositionChanged( const base::string16& text, - int32 selection_start, - int32 selection_end, + int32_t selection_start, + int32_t selection_end, const std::vector<metro_viewer::UnderlineInfo>& underlines) { ui_channel_->Send(new MetroViewerHostMsg_ImeCompositionChanged( text, selection_start, selection_end, underlines)); @@ -962,17 +960,17 @@ void ChromeAppViewAsh::SendMouseButton(int x, int y, int extra, ui::EventType event_type, - uint32 flags, + uint32_t flags, ui::EventFlags changed_button, bool is_horizontal_wheel) { if (!ui_channel_) return; MetroViewerHostMsg_MouseButtonParams params; - params.x = static_cast<int32>(x); - params.y = static_cast<int32>(y); - params.extra = static_cast<int32>(extra); + params.x = static_cast<int32_t>(x); + params.y = static_cast<int32_t>(y); + params.extra = static_cast<int32_t>(extra); params.event_type = event_type; - params.flags = static_cast<int32>(flags); + params.flags = static_cast<int32_t>(flags); params.changed_button = changed_button; params.is_horizontal_wheel = is_horizontal_wheel; ui_channel_->Send(new MetroViewerHostMsg_MouseButton(params)); @@ -983,7 +981,7 @@ void ChromeAppViewAsh::GenerateMouseEventFromMoveIfNecessary( ui::EventType event_type; // For aura we want the flags to include the button that was released, thus // we or the old and new. - uint32 mouse_down_flags = pointer.mouse_down_flags() | mouse_down_flags_; + uint32_t mouse_down_flags = pointer.mouse_down_flags() | mouse_down_flags_; mouse_down_flags_ = pointer.mouse_down_flags(); switch (pointer.update_kind()) { case winui::Input::PointerUpdateKind_LeftButtonPressed: @@ -1111,10 +1109,9 @@ HRESULT ChromeAppViewAsh::OnPointerReleased( if (pointer.IsMouse()) { mouse_down_flags_ = ui::EF_NONE; SendMouseButton(pointer.x(), pointer.y(), 0, ui::ET_MOUSE_RELEASED, - static_cast<uint32>(pointer.changed_button()) | - GetKeyboardEventFlags(), - pointer.changed_button(), - pointer.is_horizontal_wheel()); + static_cast<uint32_t>(pointer.changed_button()) | + GetKeyboardEventFlags(), + pointer.changed_button(), pointer.is_horizontal_wheel()); } else { DCHECK(pointer.IsTouch()); ui_channel_->Send(new MetroViewerHostMsg_TouchUp(pointer.x(), @@ -1206,7 +1203,7 @@ HRESULT ChromeAppViewAsh::OnAcceleratorKeyDown( if (FAILED(hr)) return hr; - uint32 keyboard_flags = GetKeyboardEventFlags(); + uint32_t keyboard_flags = GetKeyboardEventFlags(); switch (event_type) { case winui::Core::CoreAcceleratorKeyEventType_SystemCharacter: @@ -1380,8 +1377,8 @@ HRESULT ChromeAppViewAsh::OnSizeChanged(winui::Core::ICoreWindow* sender, RECT rect = {0}; ::GetWindowRect(core_window_hwnd_, &rect); - uint32 cx = static_cast<uint32>(rect.right - rect.left); - uint32 cy = static_cast<uint32>(rect.bottom - rect.top); + uint32_t cx = static_cast<uint32_t>(rect.right - rect.left); + uint32_t cy = static_cast<uint32_t>(rect.bottom - rect.top); DVLOG(1) << "Window size changed: width=" << cx << ", height=" << cy; ui_channel_->Send(new MetroViewerHostMsg_WindowSizeChanged(cx, cy)); diff --git a/win8/metro_driver/chrome_app_view_ash.h b/win8/metro_driver/chrome_app_view_ash.h index 9fd7c29..ffe1d7e 100644 --- a/win8/metro_driver/chrome_app_view_ash.h +++ b/win8/metro_driver/chrome_app_view_ash.h @@ -5,6 +5,7 @@ #ifndef WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ #define WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ +#include <stdint.h> #include <windows.applicationmodel.core.h> #include <windows.ui.core.h> #include <windows.ui.input.h> @@ -108,7 +109,7 @@ class ChromeAppViewAsh void OnImeCancelComposition(); void OnImeUpdateTextInputClient( - const std::vector<int32>& input_scopes, + const std::vector<int32_t>& input_scopes, const std::vector<metro_viewer::CharacterBounds>& character_bounds); void OnMetroExit(MetroTerminateMethod method); @@ -128,8 +129,8 @@ class ChromeAppViewAsh // TextServiceDelegate overrides. void OnCompositionChanged( const base::string16& text, - int32 selection_start, - int32 selection_end, + int32_t selection_start, + int32_t selection_end, const std::vector<metro_viewer::UnderlineInfo>& underlines) override; void OnTextCommitted(const base::string16& text) override; @@ -139,7 +140,7 @@ class ChromeAppViewAsh int y, int extra, ui::EventType event_type, - uint32 flags, + uint32_t flags, ui::EventFlags changed_button, bool is_horizontal_wheel); @@ -223,7 +224,7 @@ class ChromeAppViewAsh // Keep state about which button is currently down, if any, as PointerMoved // events do not contain that state, but Ash's MouseEvents need it. Value is // as a bitmask of ui::EventFlags. - uint32 mouse_down_flags_; + uint32_t mouse_down_flags_; // Set the D3D swap chain and nothing else. metro_driver::Direct3DHelper direct3d_helper_; diff --git a/win8/metro_driver/devices_handler.h b/win8/metro_driver/devices_handler.h index fdb2226..ea3b140 100644 --- a/win8/metro_driver/devices_handler.h +++ b/win8/metro_driver/devices_handler.h @@ -7,7 +7,7 @@ #include <windows.ui.core.h> -#include "base/basictypes.h" +#include "base/macros.h" #include "win8/metro_driver/print_handler.h" namespace metro_driver { diff --git a/win8/metro_driver/direct3d_helper.h b/win8/metro_driver/direct3d_helper.h index a5547ba..863a146 100644 --- a/win8/metro_driver/direct3d_helper.h +++ b/win8/metro_driver/direct3d_helper.h @@ -5,12 +5,13 @@ #ifndef WIN8_METRO_DRIVER_DIRECT3D_HELPER_ #define WIN8_METRO_DRIVER_DIRECT3D_HELPER_ -#include "base/basictypes.h" #include <windows.ui.core.h> #include <windows.foundation.h> #include <d3d11_1.h> +#include "base/macros.h" + namespace metro_driver { // We need to initalize a Direct3D device and swapchain so that the browser diff --git a/win8/metro_driver/file_picker.cc b/win8/metro_driver/file_picker.cc index b41e6be..708b338 100644 --- a/win8/metro_driver/file_picker.cc +++ b/win8/metro_driver/file_picker.cc @@ -5,11 +5,14 @@ #include "stdafx.h" #include "win8/metro_driver/file_picker.h" +#include <stddef.h> +#include <stdint.h> #include <windows.storage.pickers.h> #include "base/bind.h" #include "base/files/file_path.h" #include "base/logging.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/strings/string_util.h" #include "base/synchronization/waitable_event.h" @@ -513,7 +516,7 @@ HRESULT SaveFilePickerSession::StartFilePicker() { // The save picker requires at least one choice. Callers are strongly advised // to provide sensible choices. If none were given, fallback to .dat. - uint32 num_choices = 0; + uint32_t num_choices = 0; hr = choices->get_Size(&num_choices); if (FAILED(hr)) return hr; diff --git a/win8/metro_driver/file_picker_ash.cc b/win8/metro_driver/file_picker_ash.cc index a420b53..8cafb73 100644 --- a/win8/metro_driver/file_picker_ash.cc +++ b/win8/metro_driver/file_picker_ash.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 "stdafx.h" #include "win8/metro_driver/file_picker_ash.h" @@ -459,7 +462,7 @@ HRESULT SaveFilePickerSession::StartFilePicker() { // The save picker requires at least one choice. Callers are strongly advised // to provide sensible choices. If none were given, fallback to .dat. - uint32 num_choices = 0; + uint32_t num_choices = 0; hr = choices->get_Size(&num_choices); if (FAILED(hr)) return hr; diff --git a/win8/metro_driver/file_picker_ash.h b/win8/metro_driver/file_picker_ash.h index c08d293..5d41a83 100644 --- a/win8/metro_driver/file_picker_ash.h +++ b/win8/metro_driver/file_picker_ash.h @@ -6,9 +6,9 @@ #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/strings/string16.h" class ChromeAppViewAsh; diff --git a/win8/metro_driver/ime/input_scope.cc b/win8/metro_driver/ime/input_scope.cc index 7eb60b2..43c85bf 100644 --- a/win8/metro_driver/ime/input_scope.cc +++ b/win8/metro_driver/ime/input_scope.cc @@ -8,6 +8,7 @@ #include <atlcom.h> #include "base/logging.h" +#include "base/macros.h" #include "ui/base/win/atl_module.h" namespace metro_driver { diff --git a/win8/metro_driver/ime/input_source.cc b/win8/metro_driver/ime/input_source.cc index 17d36bf..079ddb0 100644 --- a/win8/metro_driver/ime/input_source.cc +++ b/win8/metro_driver/ime/input_source.cc @@ -11,6 +11,7 @@ #include "base/bind.h" #include "base/callback.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/observer_list.h" #include "base/win/scoped_comptr.h" diff --git a/win8/metro_driver/ime/input_source_observer.h b/win8/metro_driver/ime/input_source_observer.h index 4be77a5..196f33f 100644 --- a/win8/metro_driver/ime/input_source_observer.h +++ b/win8/metro_driver/ime/input_source_observer.h @@ -7,7 +7,6 @@ #include <Windows.h> -#include "base/basictypes.h" namespace metro_driver { diff --git a/win8/metro_driver/ime/text_service.cc b/win8/metro_driver/ime/text_service.cc index ebfc23a..1ad071b 100644 --- a/win8/metro_driver/ime/text_service.cc +++ b/win8/metro_driver/ime/text_service.cc @@ -5,8 +5,11 @@ #include "win8/metro_driver/ime/text_service.h" #include <msctf.h> +#include <stddef.h> +#include <stdint.h> #include "base/logging.h" +#include "base/macros.h" #include "base/win/scoped_variant.h" #include "ui/metro_viewer/ime_types.h" #include "win8/metro_driver/ime/text_service_delegate.h" @@ -153,7 +156,7 @@ bool InitializeDisabledContext(ITfContext* context, TfClientId client_id) { } base::win::ScopedVariant empty_context_variant; - empty_context_variant.Set(static_cast<int32>(1)); + empty_context_variant.Set(static_cast<int32_t>(1)); hr = empty_context->SetValue(client_id, empty_context_variant.ptr()); if (FAILED(hr)) { LOG(ERROR) << "ITfCompartment::SetValue failed. hr = " << hr; @@ -343,10 +346,9 @@ class TextServiceImpl : public TextService, text_store->CancelComposition(); } - void OnDocumentChanged( - const std::vector<int32>& input_scopes, - const std::vector<metro_viewer::CharacterBounds>& character_bounds) - override { + void OnDocumentChanged(const std::vector<int32_t>& input_scopes, + const std::vector<metro_viewer::CharacterBounds>& + character_bounds) override { bool document_type_changed = input_scopes_ != input_scopes; input_scopes_ = input_scopes; composition_character_bounds_ = character_bounds; @@ -373,8 +375,8 @@ class TextServiceImpl : public TextService, void OnCompositionChanged( const base::string16& text, - int32 selection_start, - int32 selection_end, + int32_t selection_start, + int32_t selection_end, const std::vector<metro_viewer::UnderlineInfo>& underlines) override { if (!delegate_) return; @@ -410,7 +412,7 @@ class TextServiceImpl : public TextService, return rect; } - bool GetCompositionCharacterBounds(uint32 index, RECT* rect) override { + bool GetCompositionCharacterBounds(uint32_t index, RECT* rect) override { if (index >= composition_character_bounds_.size()) { return false; } @@ -424,7 +426,7 @@ class TextServiceImpl : public TextService, return true; } - void OnDocumentTypeChanged(const std::vector<int32>& input_scopes) { + void OnDocumentTypeChanged(const std::vector<int32_t>& input_scopes) { std::vector<InputScope> native_input_scopes(input_scopes.size()); for (size_t i = 0; i < input_scopes.size(); ++i) native_input_scopes[i] = static_cast<InputScope>(input_scopes[i]); @@ -449,7 +451,7 @@ class TextServiceImpl : public TextService, // the focused text field. Note that in our IPC message protocol, an empty // |input_scopes_| has special meaning that IMEs must be disabled on this // document. - std::vector<int32> input_scopes_; + std::vector<int32_t> input_scopes_; // Character bounds of the composition. When there is no composition but this // vector is not empty, the first element contains the caret bounds. std::vector<metro_viewer::CharacterBounds> composition_character_bounds_; diff --git a/win8/metro_driver/ime/text_service.h b/win8/metro_driver/ime/text_service.h index 6ddd21f..c3dcacd 100644 --- a/win8/metro_driver/ime/text_service.h +++ b/win8/metro_driver/ime/text_service.h @@ -5,11 +5,11 @@ #ifndef WIN8_METRO_DRIVER_IME_TEXT_SERVICE_H_ #define WIN8_METRO_DRIVER_IME_TEXT_SERVICE_H_ -#include <Windows.h> +#include <windows.h> +#include <stdint.h> #include <vector> -#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" namespace metro_viewer { @@ -31,12 +31,12 @@ class TextService { // Updates document type with |input_scopes| and caret/composition position // with |character_bounds|. An empty |input_scopes| indicates that IMEs // should be disabled until non-empty |input_scopes| is specified. - // Note: |input_scopes| is defined as std::vector<int32> here rather than + // Note: |input_scopes| is defined as std::vector<int32_t> here rather than // std::vector<InputScope> because the wire format of IPC message - // MetroViewerHostMsg_ImeTextInputClientUpdated uses std::vector<int32> to + // MetroViewerHostMsg_ImeTextInputClientUpdated uses std::vector<int32_t> to // avoid dependency on <InputScope.h> header. virtual void OnDocumentChanged( - const std::vector<int32>& input_scopes, + const std::vector<int32_t>& input_scopes, const std::vector<metro_viewer::CharacterBounds>& character_bounds) = 0; // Must be called whenever the attached window gains keyboard focus. diff --git a/win8/metro_driver/ime/text_service_delegate.h b/win8/metro_driver/ime/text_service_delegate.h index 9b22a82..b78bec0 100644 --- a/win8/metro_driver/ime/text_service_delegate.h +++ b/win8/metro_driver/ime/text_service_delegate.h @@ -5,9 +5,10 @@ #ifndef WIN8_METRO_DRIVER_IME_TEXT_SERVICE_DELEGATE_H_ #define WIN8_METRO_DRIVER_IME_TEXT_SERVICE_DELEGATE_H_ +#include <stdint.h> + #include <vector> -#include "base/basictypes.h" #include "base/strings/string16.h" namespace metro_viewer { @@ -27,8 +28,8 @@ class TextServiceDelegate { // that the composition is canceled. virtual void OnCompositionChanged( const base::string16& text, - int32 selection_start, - int32 selection_end, + int32_t selection_start, + int32_t selection_end, const std::vector<metro_viewer::UnderlineInfo>& underlines) = 0; // Called when |text| is committed. diff --git a/win8/metro_driver/ime/text_store.cc b/win8/metro_driver/ime/text_store.cc index 6466e9f..0b3c9fa 100644 --- a/win8/metro_driver/ime/text_store.cc +++ b/win8/metro_driver/ime/text_store.cc @@ -4,6 +4,9 @@ #include "win8/metro_driver/ime/text_store.h" +#include <stddef.h> +#include <stdint.h> + #include <algorithm> #include "base/win/scoped_variant.h" @@ -304,8 +307,8 @@ STDMETHODIMP TextStore::GetTextExt(TsViewCookie view_cookie, // right position when composition has multiple lines. RECT result; RECT tmp_rect; - const uint32 start_pos = acp_start - committed_size_; - const uint32 end_pos = acp_end - committed_size_; + const uint32_t start_pos = acp_start - committed_size_; + const uint32_t end_pos = acp_end - committed_size_; if (start_pos == end_pos) { // According to MSDN document, if |acp_start| and |acp_end| are equal it is @@ -500,7 +503,7 @@ STDMETHODIMP TextStore::RequestLock(DWORD lock_flags, HRESULT* result) { current_lock_type_ = (lock_flags & TS_LF_READWRITE); edit_flag_ = false; - const uint32 last_committed_size = committed_size_; + const uint32_t last_committed_size = committed_size_; // Grant the lock. *result = text_store_acp_sink_->OnLockGranted(current_lock_type_); @@ -522,7 +525,7 @@ STDMETHODIMP TextStore::RequestLock(DWORD lock_flags, HRESULT* result) { // If the text store is edited in OnLockGranted(), we may need to call // TextStoreDelegate::ConfirmComposition() or // TextStoreDelegate::SetComposition(). - const uint32 new_committed_size = committed_size_; + const uint32_t new_committed_size = committed_size_; const base::string16& new_committed_string = string_buffer_.substr(last_committed_size, new_committed_size - last_committed_size); @@ -541,8 +544,8 @@ STDMETHODIMP TextStore::RequestLock(DWORD lock_flags, HRESULT* result) { underlines[i].start_offset -= new_committed_size; underlines[i].end_offset -= new_committed_size; } - int32 selection_start = 0; - int32 selection_end = 0; + int32_t selection_start = 0; + int32_t selection_end = 0; if (selection_start_ >= new_committed_size) selection_start = selection_start_ - new_committed_size; if (selection_end_ >= new_committed_size) @@ -727,7 +730,7 @@ bool TextStore::GetDisplayAttribute(TfGuidAtom guid_atom, bool TextStore::GetCompositionStatus( ITfContext* context, const TfEditCookie read_only_edit_cookie, - uint32* committed_size, + uint32_t* committed_size, std::vector<metro_viewer::UnderlineInfo>* undelines) { DCHECK(context); DCHECK(committed_size); @@ -819,8 +822,8 @@ bool TextStore::CancelComposition() { // we use the same operation to cancel composition here to minimize the risk // of potential compatibility issues. - const uint32 previous_buffer_size = - static_cast<uint32>(string_buffer_.size()); + const uint32_t previous_buffer_size = + static_cast<uint32_t>(string_buffer_.size()); string_buffer_.clear(); committed_size_ = 0; selection_start_ = 0; @@ -856,8 +859,8 @@ bool TextStore::ConfirmComposition() { if (!composition_text.empty()) delegate_->OnTextCommitted(composition_text); - const uint32 previous_buffer_size = - static_cast<uint32>(string_buffer_.size()); + const uint32_t previous_buffer_size = + static_cast<uint32_t>(string_buffer_.size()); string_buffer_.clear(); committed_size_ = 0; selection_start_ = 0; diff --git a/win8/metro_driver/ime/text_store.h b/win8/metro_driver/ime/text_store.h index 3af5bf2..123a824 100644 --- a/win8/metro_driver/ime/text_store.h +++ b/win8/metro_driver/ime/text_store.h @@ -10,12 +10,13 @@ #include <initguid.h> #include <inputscope.h> #include <msctf.h> +#include <stdint.h> #include <deque> #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/strings/string16.h" #include "base/win/scoped_comptr.h" @@ -245,7 +246,7 @@ class ATL_NO_VTABLE TextStore bool GetCompositionStatus( ITfContext* context, const TfEditCookie read_only_edit_cookie, - uint32* committed_size, + uint32_t* committed_size, std::vector<metro_viewer::UnderlineInfo>* undelines); // A pointer of ITextStoreACPSink, this instance is given in AdviseSink. @@ -262,15 +263,15 @@ class ATL_NO_VTABLE TextStore // |string_buffer_|: "aoiumi" // |committed_size_|: 3 base::string16 string_buffer_; - uint32 committed_size_; + uint32_t committed_size_; // |selection_start_| and |selection_end_| indicates the selection range. // Example: "iue" is selected // |string_buffer_|: "aiueo" // |selection_start_|: 1 // |selection_end_|: 4 - uint32 selection_start_; - uint32 selection_end_; + uint32_t selection_start_; + uint32_t selection_end_; // |start_offset| and |end_offset| of |composition_undelines_| indicates // the offsets in |string_buffer_|. diff --git a/win8/metro_driver/ime/text_store_delegate.h b/win8/metro_driver/ime/text_store_delegate.h index 153d664..4a3f03f 100644 --- a/win8/metro_driver/ime/text_store_delegate.h +++ b/win8/metro_driver/ime/text_store_delegate.h @@ -8,8 +8,8 @@ #include <vector> #include <windows.h> +#include <stdint.h> -#include "base/basictypes.h" #include "base/strings/string16.h" namespace metro_viewer { @@ -31,8 +31,8 @@ class TextStoreDelegate { // that the composition is canceled. virtual void OnCompositionChanged( const base::string16& text, - int32 selection_start, - int32 selection_end, + int32_t selection_start, + int32_t selection_end, const std::vector<metro_viewer::UnderlineInfo>& underlines) = 0; // Called when |text| is committed. @@ -47,7 +47,7 @@ class TextStoreDelegate { // implement this method must return true and fill the character bounds into // |rect| in screen coordinates. // Should return false if |index| is invalid. - virtual bool GetCompositionCharacterBounds(uint32 index, RECT* rect) = 0; + virtual bool GetCompositionCharacterBounds(uint32_t index, RECT* rect) = 0; }; } // namespace metro_driver diff --git a/win8/metro_driver/metro_driver_win7.cc b/win8/metro_driver/metro_driver_win7.cc index c88cd3f..62662f5 100644 --- a/win8/metro_driver/metro_driver_win7.cc +++ b/win8/metro_driver/metro_driver_win7.cc @@ -5,8 +5,10 @@ #include "stdafx.h" #include <corewindow.h> #include <shobjidl.h> +#include <stdint.h> #include "base/logging.h" +#include "base/macros.h" #include "ui/gfx/geometry/safe_integer_conversions.h" #include "ui/gfx/win/msg_util.h" @@ -157,14 +159,14 @@ class MouseEvent : public mswr::RuntimeClass< return S_OK; } - HRESULT STDMETHODCALLTYPE get_PointerId(uint32* pointer_id) override { + HRESULT STDMETHODCALLTYPE get_PointerId(uint32_t* pointer_id) override { // TODO(ananta) // Implement this properly. *pointer_id = 1; return S_OK; } - HRESULT STDMETHODCALLTYPE get_Timestamp(uint64* timestamp) override { + HRESULT STDMETHODCALLTYPE get_Timestamp(uint64_t* timestamp) override { *timestamp = msg_.time; return S_OK; } @@ -180,7 +182,7 @@ class MouseEvent : public mswr::RuntimeClass< return E_NOTIMPL; } - HRESULT STDMETHODCALLTYPE get_FrameId(uint32* frame_id) override { + HRESULT STDMETHODCALLTYPE get_FrameId(uint32_t* frame_id) override { return E_NOTIMPL; } @@ -312,14 +314,15 @@ class MouseEvent : public mswr::RuntimeClass< return E_NOTIMPL; } - HRESULT STDMETHODCALLTYPE - HasUsage(uint32 usage_page, uint32 usage_id, boolean* has_usage) override { + HRESULT STDMETHODCALLTYPE HasUsage(uint32_t usage_page, + uint32_t usage_id, + boolean* has_usage) override { return E_NOTIMPL; } - HRESULT STDMETHODCALLTYPE GetUsageValue(uint32 usage_page, - uint32 usage_id, - int32* usage_value) override { + HRESULT STDMETHODCALLTYPE GetUsageValue(uint32_t usage_page, + uint32_t usage_id, + int32_t* usage_value) override { return E_NOTIMPL; } @@ -338,7 +341,7 @@ class MouseEvent : public mswr::RuntimeClass< return E_NOTIMPL; } - HRESULT STDMETHODCALLTYPE get_MaxContacts(uint32* contacts) override { + HRESULT STDMETHODCALLTYPE get_MaxContacts(uint32_t* contacts) override { return E_NOTIMPL; } @@ -393,7 +396,7 @@ class KeyEvent : public mswr::RuntimeClass< } // ICharacterReceivedEventArgs implementation. - HRESULT STDMETHODCALLTYPE get_KeyCode(uint32* key_code) override { + HRESULT STDMETHODCALLTYPE get_KeyCode(uint32_t* key_code) override { *key_code = msg_.wParam; return S_OK; } diff --git a/win8/metro_driver/print_document_source.cc b/win8/metro_driver/print_document_source.cc index 9d2a0c4..3d371da 100644 --- a/win8/metro_driver/print_document_source.cc +++ b/win8/metro_driver/print_document_source.cc @@ -5,6 +5,8 @@ #include "stdafx.h" #include "win8/metro_driver/print_document_source.h" +#include <stddef.h> +#include <stdint.h> #include <windows.graphics.display.h> #include "base/logging.h" @@ -211,7 +213,7 @@ STDMETHODIMP PrintDocumentSource::MakeDocument( return hr; } -STDMETHODIMP PrintDocumentSource::Paginate(uint32 page, +STDMETHODIMP PrintDocumentSource::Paginate(uint32_t page, IInspectable* options) { DVLOG(1) << __FUNCTION__ << ", page = " << page; DCHECK(options != NULL); @@ -261,7 +263,7 @@ STDMETHODIMP PrintDocumentSource::Paginate(uint32 page, return hr; } -STDMETHODIMP PrintDocumentSource::MakePage(uint32 job_page, +STDMETHODIMP PrintDocumentSource::MakePage(uint32_t job_page, float width, float height) { DVLOG(1) << __FUNCTION__ << ", width: " << width << ", height: " << height diff --git a/win8/metro_driver/print_document_source.h b/win8/metro_driver/print_document_source.h index fbd3c17..8f3d53b 100644 --- a/win8/metro_driver/print_document_source.h +++ b/win8/metro_driver/print_document_source.h @@ -7,11 +7,12 @@ #include <documentsource.h> #include <printpreview.h> +#include <stddef.h> +#include <stdint.h> #include <windows.graphics.printing.h> #include <vector> -#include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_vector.h" #include "base/synchronization/condition_variable.h" @@ -87,8 +88,8 @@ class PrintDocumentSource IPrintDocumentPackageTarget* package_target); // classic COM interface IPrintPreviewPageCollection methods - STDMETHOD(Paginate)(uint32 page, IInspectable* options); - STDMETHOD(MakePage)(uint32 desired_page, float width, float height); + STDMETHOD(Paginate)(uint32_t page, IInspectable* options); + STDMETHOD(MakePage)(uint32_t desired_page, float width, float height); // If the screen DPI changes, we must be warned here. void ResetDpi(float dpi); diff --git a/win8/metro_driver/print_handler.cc b/win8/metro_driver/print_handler.cc index c409fcd..3911a8b 100644 --- a/win8/metro_driver/print_handler.cc +++ b/win8/metro_driver/print_handler.cc @@ -5,6 +5,7 @@ #include "stdafx.h" #include "win8/metro_driver/print_handler.h" +#include <stddef.h> #include <windows.graphics.display.h> #include "base/bind.h" diff --git a/win8/metro_driver/print_handler.h b/win8/metro_driver/print_handler.h index f0779cf..0fe5719 100644 --- a/win8/metro_driver/print_handler.h +++ b/win8/metro_driver/print_handler.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_UI_METRO_DRIVER_PRINT_HANDLER_H_ #include <windows.media.playto.h> +#include <stddef.h> #include <windows.graphics.printing.h> #include <windows.ui.core.h> diff --git a/win8/test/open_with_dialog_controller.cc b/win8/test/open_with_dialog_controller.cc index e980197..c57d756 100644 --- a/win8/test/open_with_dialog_controller.cc +++ b/win8/test/open_with_dialog_controller.cc @@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/callback.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" diff --git a/win8/test/open_with_dialog_controller.h b/win8/test/open_with_dialog_controller.h index 18ac9e9..17f4c27 100644 --- a/win8/test/open_with_dialog_controller.h +++ b/win8/test/open_with_dialog_controller.h @@ -9,8 +9,8 @@ #include <vector> -#include "base/basictypes.h" #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/strings/string16.h" diff --git a/win8/test/ui_automation_client.cc b/win8/test/ui_automation_client.cc index 22c1af1..6ebf7847 100644 --- a/win8/test/ui_automation_client.cc +++ b/win8/test/ui_automation_client.cc @@ -7,12 +7,14 @@ #include <atlbase.h> #include <atlcom.h> #include <oleauto.h> +#include <stdint.h> #include <uiautomation.h> #include <algorithm> #include "base/bind.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" @@ -574,7 +576,7 @@ void UIAutomationClient::Context::CloseWindow( HWND handle = reinterpret_cast<HWND>(V_I4(var.ptr())); - uint32 scan_code = MapVirtualKey(VK_ESCAPE, MAPVK_VK_TO_VSC); + uint32_t scan_code = MapVirtualKey(VK_ESCAPE, MAPVK_VK_TO_VSC); PostMessage(handle, WM_KEYDOWN, VK_ESCAPE, MAKELPARAM(1, scan_code)); PostMessage(handle, WM_KEYUP, VK_ESCAPE, diff --git a/win8/test/ui_automation_client.h b/win8/test/ui_automation_client.h index e8b89f7..b904f39 100644 --- a/win8/test/ui_automation_client.h +++ b/win8/test/ui_automation_client.h @@ -11,8 +11,8 @@ #include <windows.h> #include <vector> -#include "base/basictypes.h" #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/strings/string16.h" #include "base/threading/thread.h" diff --git a/win8/viewer/metro_viewer_process_host.cc b/win8/viewer/metro_viewer_process_host.cc index 348dfda6..a365241 100644 --- a/win8/viewer/metro_viewer_process_host.cc +++ b/win8/viewer/metro_viewer_process_host.cc @@ -5,6 +5,7 @@ #include "win8/viewer/metro_viewer_process_host.h" #include <shlobj.h> +#include <stdint.h> #include "base/command_line.h" #include "base/files/file_path.h" @@ -41,7 +42,7 @@ MetroViewerProcessHost::InternalMessageFilter::InternalMessageFilter( } void MetroViewerProcessHost::InternalMessageFilter::OnChannelConnected( - int32 peer_pid) { + int32_t peer_pid) { owner_->NotifyChannelConnected(); } diff --git a/win8/viewer/metro_viewer_process_host.h b/win8/viewer/metro_viewer_process_host.h index a042a0b..2b1a56f 100644 --- a/win8/viewer/metro_viewer_process_host.h +++ b/win8/viewer/metro_viewer_process_host.h @@ -5,8 +5,10 @@ #ifndef WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ #define WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ -#include "base/basictypes.h" +#include <stdint.h> + #include "base/callback.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" @@ -166,7 +168,7 @@ class METRO_VIEWER_EXPORT MetroViewerProcessHost : public IPC::Listener, virtual void OnHandleSearchRequest(const base::string16& search_string) = 0; // Called over IPC by the viewer process when the window size has changed. - virtual void OnWindowSizeChanged(uint32 width, uint32 height) = 0; + virtual void OnWindowSizeChanged(uint32_t width, uint32_t height) = 0; void NotifyChannelConnected(); @@ -188,7 +190,7 @@ class METRO_VIEWER_EXPORT MetroViewerProcessHost : public IPC::Listener, InternalMessageFilter(MetroViewerProcessHost* owner); // IPC::MessageFilter implementation. - void OnChannelConnected(int32 peer_pid) override; + void OnChannelConnected(int32_t peer_pid) override; private: ~InternalMessageFilter() override; |