Skip to content

Commit

Permalink
Switch to standard integer types in ash/.
Browse files Browse the repository at this point in the history
BUG=138542
TBR=sky@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#366304}
  • Loading branch information
avi authored and Commit bot committed Dec 20, 2015
1 parent 0f2f93d commit db567a8
Show file tree
Hide file tree
Showing 351 changed files with 661 additions and 431 deletions.
6 changes: 3 additions & 3 deletions ash/accelerators/accelerator_commands.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ bool ZoomInternalDisplay(bool up) {

DisplayManager* display_manager = Shell::GetInstance()->display_manager();

int64 display_id = display_manager->IsInUnifiedMode()
? DisplayManager::kUnifiedDisplayId
: display_manager->GetDisplayIdForUIScaling();
int64_t display_id = display_manager->IsInUnifiedMode()
? DisplayManager::kUnifiedDisplayId
: display_manager->GetDisplayIdForUIScaling();
const DisplayInfo& display_info = display_manager->GetDisplayInfo(display_id);
DisplayMode mode;

Expand Down
4 changes: 3 additions & 1 deletion ash/accelerators/accelerator_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
#ifndef ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_
#define ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_

#include <stddef.h>

#include <map>
#include <set>

#include "ash/accelerators/accelerator_table.h"
#include "ash/accelerators/exit_warning_handler.h"
#include "ash/ash_export.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/accelerators/accelerator_history.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/accelerators/accelerator_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "ash/accelerators/accelerator_table.h"

#include "ash/strings/grit/ash_strings.h"
#include "base/basictypes.h"
#include "base/macros.h"

namespace ash {

Expand Down
3 changes: 2 additions & 1 deletion ash/accelerators/accelerator_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
#ifndef ASH_ACCELERATORS_ACCELERATOR_TABLE_H_
#define ASH_ACCELERATORS_ACCELERATOR_TABLE_H_

#include <stddef.h>

#include "ash/ash_export.h"
#include "base/basictypes.h"
#include "ui/events/event_constants.h"
#include "ui/events/keycodes/keyboard_codes.h"

Expand Down
1 change: 0 additions & 1 deletion ash/accelerators/accelerator_table_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <set>

#include "ash/accelerators/accelerator_table.h"
#include "base/basictypes.h"
#include "base/strings/string_util.h"
#include "testing/gtest/include/gtest/gtest.h"

Expand Down
2 changes: 1 addition & 1 deletion ash/accelerators/exit_warning_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
namespace ash {
namespace {

const int64 kTimeOutMilliseconds = 2000;
const int64_t kTimeOutMilliseconds = 2000;
// Color of the text of the warning message.
const SkColor kTextColor = SK_ColorWHITE;
// Color of the window background.
Expand Down
1 change: 1 addition & 0 deletions ash/accelerators/exit_warning_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ASH_ACCELERATORS_EXIT_WARNING_HANDLER_H_

#include "ash/ash_export.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/timer/timer.h"
#include "ui/base/accelerators/accelerator.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/accelerators/focus_manager_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#ifndef ASH_ACCELERATORS_FOCUS_MANAGER_FACTORY_H_
#define ASH_ACCELERATORS_FOCUS_MANAGER_FACTORY_H_

#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "ui/views/focus/focus_manager_delegate.h"
#include "ui/views/focus/focus_manager_factory.h"

Expand Down
1 change: 1 addition & 0 deletions ash/accelerators/key_hold_detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ASH_ACCELERATOR_KEY_HOLD_DETECTOR_H_

#include "ash/ash_export.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "ui/events/event_handler.h"

Expand Down
1 change: 1 addition & 0 deletions ash/accelerators/magnifier_key_scroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "ash/accelerators/key_hold_detector.h"
#include "ash/ash_export.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "ui/events/event_handler.h"

Expand Down
1 change: 1 addition & 0 deletions ash/accelerators/spoken_feedback_toggler.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "ash/accelerators/key_hold_detector.h"
#include "ash/ash_export.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "ui/events/event_handler.h"

Expand Down
1 change: 1 addition & 0 deletions ash/ash_touch_exploration_manager_chromeos.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "ash/ash_export.h"
#include "ash/system/tray_accessibility.h"
#include "base/macros.h"
#include "ui/chromeos/touch_exploration_controller.h"

namespace chromeos {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace {
const float kDegreesToRadians = 3.1415926f / 180.0f;
const float kMeanGravity = -9.8066f;

DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) {
DisplayInfo CreateDisplayInfo(int64_t id, const gfx::Rect& bounds) {
DisplayInfo info(id, "dummy", false);
info.SetBounds(bounds);
return info;
Expand All @@ -58,7 +58,8 @@ bool RotationLocked() {
->rotation_locked();
}

void SetDisplayRotationById(int64 display_id, gfx::Display::Rotation rotation) {
void SetDisplayRotationById(int64_t display_id,
gfx::Display::Rotation rotation) {
Shell::GetInstance()->display_manager()->SetDisplayRotation(
display_id, rotation, gfx::Display::ROTATION_SOURCE_USER);
}
Expand Down Expand Up @@ -596,7 +597,7 @@ TEST_F(ScreenOrientationControllerTest, UserRotationLockDisallowsRotation) {
TEST_F(ScreenOrientationControllerTest, InternalDisplayNotAvailableAtStartup) {
test::DisplayManagerTestApi().SetFirstDisplayAsInternalDisplay();

int64 internal_display_id = gfx::Display::InternalDisplayId();
int64_t internal_display_id = gfx::Display::InternalDisplayId();
gfx::Display::SetInternalDisplayId(gfx::Display::kInvalidDisplayID);

EnableMaximizeMode(true);
Expand All @@ -618,8 +619,8 @@ TEST_F(ScreenOrientationControllerTest, InternalDisplayNotAvailableAtStartup) {

// Verifies rotating an inactive Display is successful.
TEST_F(ScreenOrientationControllerTest, RotateInactiveDisplay) {
const int64 kInternalDisplayId = 9;
const int64 kExternalDisplayId = 10;
const int64_t kInternalDisplayId = 9;
const int64_t kExternalDisplayId = 10;
const gfx::Display::Rotation kNewRotation = gfx::Display::ROTATE_180;

const DisplayInfo internal_display_info =
Expand Down
1 change: 1 addition & 0 deletions ash/content/gpu_support_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "ash/content/ash_with_content_export.h"
#include "ash/gpu_support.h"
#include "base/macros.h"

namespace ash {

Expand Down
2 changes: 1 addition & 1 deletion ash/content/keyboard_overlay/keyboard_overlay_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#define ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_DELEGATE_H_

#include "ash/content/ash_with_content_export.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "ui/web_dialogs/web_dialog_delegate.h"
#include "url/gurl.h"

Expand Down
1 change: 1 addition & 0 deletions ash/content/keyboard_overlay/keyboard_overlay_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "ash/wm/overlay_event_filter.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "ui/views/controls/webview/web_dialog_view.h"

class GURL;
Expand Down
6 changes: 4 additions & 2 deletions ash/content/screen_orientation_delegate_chromeos.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/public/browser/screen_orientation_delegate.h"

#ifndef ASH_CONTENT_SCREEN_ORIENTATION_DELEGATE_CHROMEOS_H_
#define ASH_CONTENT_SCREEN_ORIENTATION_DELEGATE_CHROMEOS_H_

#include "content/public/browser/screen_orientation_delegate.h"

#include "base/macros.h"

namespace ash {

class ScreenOrientationDelegateChromeos
Expand Down
2 changes: 1 addition & 1 deletion ash/default_accessibility_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include "ash/accessibility_delegate.h"
#include "ash/ash_export.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/macros.h"

namespace ash {

Expand Down
2 changes: 1 addition & 1 deletion ash/default_user_wallpaper_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include "ash/ash_export.h"
#include "ash/desktop_background/user_wallpaper_delegate.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/macros.h"

namespace ash {

Expand Down
2 changes: 1 addition & 1 deletion ash/desktop_background/desktop_background_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include "ash/ash_export.h"
#include "ash/display/window_tree_host_manager.h"
#include "ash/shell_observer.h"
#include "base/basictypes.h"
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
Expand Down
1 change: 1 addition & 0 deletions ash/desktop_background/desktop_background_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_
#define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_

#include "base/macros.h"
#include "ui/events/event.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/views/context_menu_controller.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_

#include "ash/ash_export.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
Expand Down
1 change: 1 addition & 0 deletions ash/display/cursor_window_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ASH_DISPLAY_CURSOR_WINDOW_CONTROLLER_H_

#include "ash/ash_export.h"
#include "base/macros.h"
#include "ui/aura/window.h"
#include "ui/base/cursor/cursor.h"
#include "ui/gfx/display.h"
Expand Down
8 changes: 4 additions & 4 deletions ash/display/cursor_window_controller_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CursorWindowControllerTest : public test::AshTestBase {
return cursor_window_controller_->GetCursorImageForTest();
}

int64 GetCursorDisplayId() const {
int64_t GetCursorDisplayId() const {
return cursor_window_controller_->display_.id();
}

Expand Down Expand Up @@ -72,8 +72,8 @@ TEST_F(CursorWindowControllerTest, MoveToDifferentDisplay) {

WindowTreeHostManager* window_tree_host_manager =
Shell::GetInstance()->window_tree_host_manager();
int64 primary_display_id = window_tree_host_manager->GetPrimaryDisplayId();
int64 secondary_display_id = ScreenUtil::GetSecondaryDisplay().id();
int64_t primary_display_id = window_tree_host_manager->GetPrimaryDisplayId();
int64_t secondary_display_id = ScreenUtil::GetSecondaryDisplay().id();
aura::Window* primary_root =
window_tree_host_manager->GetRootWindowForDisplayId(primary_display_id);
aura::Window* secondary_root =
Expand Down Expand Up @@ -154,7 +154,7 @@ TEST_F(CursorWindowControllerTest, VisibilityTest) {
// the DSF becomes 1x as a result of zooming out.
TEST_F(CursorWindowControllerTest, DSF) {
UpdateDisplay("1000x500*2");
int64 primary_id = Shell::GetScreen()->GetPrimaryDisplay().id();
int64_t primary_id = Shell::GetScreen()->GetPrimaryDisplay().id();

test::ScopedSetInternalDisplayId set_internal(primary_id);
SetCursorCompositionEnabled(true);
Expand Down
6 changes: 3 additions & 3 deletions ash/display/display_change_observer_chromeos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ ui::MultipleDisplayState DisplayChangeObserver::GetStateForDisplayIds(
ui::MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED;
}

bool DisplayChangeObserver::GetResolutionForDisplayId(int64 display_id,
bool DisplayChangeObserver::GetResolutionForDisplayId(int64_t display_id,
gfx::Size* size) const {
DisplayMode mode;
if (!Shell::GetInstance()->display_manager()->GetSelectedModeForDisplayId(
Expand All @@ -180,7 +180,7 @@ void DisplayChangeObserver::OnDisplayModeChanged(
UpdateInternalDisplayId(display_states);

std::vector<DisplayInfo> displays;
std::set<int64> ids;
std::set<int64_t> ids;
for (const ui::DisplaySnapshot* state : display_states) {
const ui::DisplayMode* mode_info = state->current_mode();
if (!mode_info)
Expand Down Expand Up @@ -234,7 +234,7 @@ void DisplayChangeObserver::OnDisplayModeChanged(
name = l10n_util::GetStringUTF8(IDS_ASH_STATUS_TRAY_UNKNOWN_DISPLAY_NAME);

bool has_overscan = state->has_overscan();
int64 id = state->display_id();
int64_t id = state->display_id();
ids.insert(id);

displays.push_back(DisplayInfo(id, name, has_overscan));
Expand Down
6 changes: 4 additions & 2 deletions ash/display/display_change_observer_chromeos.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
#ifndef ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H_
#define ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H_

#include <stdint.h>

#include <vector>

#include "ash/ash_export.h"
#include "ash/shell_observer.h"
#include "base/basictypes.h"
#include "base/macros.h"
#include "ui/display/chromeos/display_configurator.h"
#include "ui/events/devices/input_device_event_observer.h"

Expand Down Expand Up @@ -41,7 +43,7 @@ class DisplayChangeObserver : public ui::DisplayConfigurator::StateController,
// ui::DisplayConfigurator::StateController overrides:
ui::MultipleDisplayState GetStateForDisplayIds(
const ui::DisplayConfigurator::DisplayStateList& outputs) const override;
bool GetResolutionForDisplayId(int64 display_id,
bool GetResolutionForDisplayId(int64_t display_id,
gfx::Size* size) const override;

// Overriden from ui::DisplayConfigurator::Observer:
Expand Down
4 changes: 3 additions & 1 deletion ash/display/display_color_manager_chromeos.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
#ifndef ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_
#define ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_

#include <stdint.h>

#include <map>
#include <vector>

#include "ash/ash_export.h"
#include "base/basictypes.h"
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "ui/display/chromeos/display_configurator.h"
#include "ui/gfx/display.h"
Expand Down
1 change: 1 addition & 0 deletions ash/display/display_configurator_animation.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "ash/ash_export.h"
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
#include "ui/display/chromeos/display_configurator.h"
Expand Down
1 change: 1 addition & 0 deletions ash/display/display_error_observer_chromeos.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "ash/ash_export.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/strings/string16.h"
#include "ui/display/chromeos/display_configurator.h"

Expand Down
8 changes: 4 additions & 4 deletions ash/display/display_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ namespace ash {
namespace {

// Use larger than max int to catch overflow early.
const int64 kSynthesizedDisplayIdStart = 2200000000LL;
const int64_t kSynthesizedDisplayIdStart = 2200000000LL;

int64 synthesized_display_id = kSynthesizedDisplayIdStart;
int64_t synthesized_display_id = kSynthesizedDisplayIdStart;

const float kDpi96 = 96.0;
bool use_125_dsf_for_ui_scaling = true;
Expand Down Expand Up @@ -112,7 +112,7 @@ DisplayInfo DisplayInfo::CreateFromSpec(const std::string& spec) {

// static
DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec,
int64 id) {
int64_t id) {
#if defined(OS_WIN)
gfx::Rect bounds_in_native(
gfx::Size(GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)));
Expand Down Expand Up @@ -247,7 +247,7 @@ DisplayInfo::DisplayInfo()
clear_overscan_insets_(false),
color_profile_(ui::COLOR_PROFILE_STANDARD) {}

DisplayInfo::DisplayInfo(int64 id, const std::string& name, bool has_overscan)
DisplayInfo::DisplayInfo(int64_t id, const std::string& name, bool has_overscan)
: id_(id),
name_(name),
has_overscan_(has_overscan),
Expand Down
Loading

0 comments on commit db567a8

Please sign in to comment.