Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(996)

Unified Diff: ash/display/window_tree_host_manager.cc

Issue 1540753002: Switch to standard integer types in ash/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: arraysize Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/display/window_tree_host_manager.h ('k') | ash/display/window_tree_host_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/window_tree_host_manager.cc
diff --git a/ash/display/window_tree_host_manager.cc b/ash/display/window_tree_host_manager.cc
index aabf1b2cb66c0993cf70b7c50ec9c1a25c66fe35..bb0224eafd82601f9d939521a4cbf51e3bdfa4a0 100644
--- a/ash/display/window_tree_host_manager.cc
+++ b/ash/display/window_tree_host_manager.cc
@@ -75,7 +75,7 @@ namespace {
// during the shutdown instead of always keeping two display instances
// (one here and another one in display_manager) in sync, which is error prone.
// This is initialized in the constructor, and then in CreatePrimaryHost().
-int64 primary_display_id = -1;
+int64_t primary_display_id = -1;
// Specifies how long the display change should have been disabled
// after each display change operations.
@@ -83,9 +83,9 @@ int64 primary_display_id = -1;
// changing the settings while the system is still configurating
// displays. It will be overriden by |kAfterDisplayChangeThrottleTimeoutMs|
// when the display change happens, so the actual timeout is much shorter.
-const int64 kAfterDisplayChangeThrottleTimeoutMs = 500;
-const int64 kCycleDisplayThrottleTimeoutMs = 4000;
-const int64 kSwapDisplayThrottleTimeoutMs = 500;
+const int64_t kAfterDisplayChangeThrottleTimeoutMs = 500;
+const int64_t kCycleDisplayThrottleTimeoutMs = 4000;
+const int64_t kSwapDisplayThrottleTimeoutMs = 500;
#if defined(USE_OZONE) && defined(OS_CHROMEOS)
// Add 20% more cursor motion on non-integrated displays.
@@ -250,7 +250,7 @@ WindowTreeHostManager::DisplayChangeLimiter::DisplayChangeLimiter()
: throttle_timeout_(base::Time::Now()) {}
void WindowTreeHostManager::DisplayChangeLimiter::SetThrottleTimeout(
- int64 throttle_ms) {
+ int64_t throttle_ms) {
throttle_timeout_ =
base::Time::Now() + base::TimeDelta::FromMilliseconds(throttle_ms);
}
@@ -297,7 +297,7 @@ void WindowTreeHostManager::Shutdown() {
Shell::GetScreen()->RemoveObserver(this);
- int64 primary_id = Shell::GetScreen()->GetPrimaryDisplay().id();
+ int64_t primary_id = Shell::GetScreen()->GetPrimaryDisplay().id();
// Delete non primary root window controllers first, then
// delete the primary root window controller.
@@ -353,7 +353,7 @@ void WindowTreeHostManager::RemoveObserver(Observer* observer) {
}
// static
-int64 WindowTreeHostManager::GetPrimaryDisplayId() {
+int64_t WindowTreeHostManager::GetPrimaryDisplayId() {
CHECK_NE(gfx::Display::kInvalidDisplayID, primary_display_id);
return primary_display_id;
}
@@ -362,14 +362,14 @@ aura::Window* WindowTreeHostManager::GetPrimaryRootWindow() {
return GetRootWindowForDisplayId(primary_display_id);
}
-aura::Window* WindowTreeHostManager::GetRootWindowForDisplayId(int64 id) {
+aura::Window* WindowTreeHostManager::GetRootWindowForDisplayId(int64_t id) {
AshWindowTreeHost* host = GetAshWindowTreeHostForDisplayId(id);
CHECK(host);
return GetWindow(host);
}
AshWindowTreeHost* WindowTreeHostManager::GetAshWindowTreeHostForDisplayId(
- int64 display_id) {
+ int64_t display_id) {
CHECK_EQ(1u, window_tree_hosts_.count(display_id)) << "display id = "
<< display_id;
return window_tree_hosts_[display_id];
@@ -402,12 +402,12 @@ aura::Window::Windows WindowTreeHostManager::GetAllRootWindows() {
return windows;
}
-gfx::Insets WindowTreeHostManager::GetOverscanInsets(int64 display_id) const {
+gfx::Insets WindowTreeHostManager::GetOverscanInsets(int64_t display_id) const {
return GetDisplayManager()->GetOverscanInsets(display_id);
}
void WindowTreeHostManager::SetOverscanInsets(
- int64 display_id,
+ int64_t display_id,
const gfx::Insets& insets_in_dip) {
GetDisplayManager()->SetOverscanInsets(display_id, insets_in_dip);
}
@@ -469,7 +469,7 @@ void WindowTreeHostManager::SwapPrimaryDisplay() {
}
}
-void WindowTreeHostManager::SetPrimaryDisplayId(int64 id) {
+void WindowTreeHostManager::SetPrimaryDisplayId(int64_t id) {
DCHECK_NE(gfx::Display::kInvalidDisplayID, id);
if (id == gfx::Display::kInvalidDisplayID || primary_display_id == id)
return;
@@ -547,7 +547,7 @@ void WindowTreeHostManager::UpdateMouseLocationAfterDisplayChange() {
gfx::Point point_in_screen = Shell::GetScreen()->GetCursorScreenPoint();
gfx::Point target_location_in_native;
- int64 closest_distance_squared = -1;
+ int64_t closest_distance_squared = -1;
DisplayManager* display_manager = GetDisplayManager();
aura::Window* dst_root_window = nullptr;
@@ -569,7 +569,7 @@ void WindowTreeHostManager::UpdateMouseLocationAfterDisplayChange() {
// We don't care about actual distance, only relative to other displays, so
// using the LengthSquared() is cheaper than Length().
- int64 distance_squared = (center - point_in_screen).LengthSquared();
+ int64_t distance_squared = (center - point_in_screen).LengthSquared();
if (closest_distance_squared < 0 ||
closest_distance_squared > distance_squared) {
aura::Window* root_window = GetRootWindowForDisplayId(display.id());
@@ -594,7 +594,7 @@ void WindowTreeHostManager::UpdateMouseLocationAfterDisplayChange() {
// the cursor.
if (!target_display.is_valid())
return;
- int64 target_display_id = target_display.id();
+ int64_t target_display_id = target_display.id();
// Do not move the cursor if the cursor's location did not change. This avoids
// moving (and showing) the cursor:
@@ -630,7 +630,7 @@ bool WindowTreeHostManager::UpdateWorkAreaOfDisplayNearestWindow(
const aura::Window* window,
const gfx::Insets& insets) {
const aura::Window* root_window = window->GetRootWindow();
- int64 id = GetRootWindowSettings(root_window)->display_id;
+ int64_t id = GetRootWindowSettings(root_window)->display_id;
// if id is |kInvaildDisplayID|, it's being deleted.
DCHECK(id != gfx::Display::kInvalidDisplayID);
return GetDisplayManager()->UpdateWorkAreaOfDisplay(id, insets);
@@ -678,7 +678,7 @@ void WindowTreeHostManager::OnDisplayAdded(const gfx::Display& display) {
#ifndef NDEBUG
auto iter = std::find_if(
window_tree_hosts_.begin(), window_tree_hosts_.end(),
- [to_delete](const std::pair<int64, AshWindowTreeHost*>& pair) {
+ [to_delete](const std::pair<int64_t, AshWindowTreeHost*>& pair) {
return pair.second == to_delete;
});
DCHECK(iter == window_tree_hosts_.end());
@@ -848,7 +848,7 @@ void WindowTreeHostManager::PostDisplayConfigurationChange() {
pair, display_manager->IsInMirrorMode(), layout.default_unified);
if (Shell::GetScreen()->GetNumDisplays() > 1) {
- int64 primary_id = layout.primary_id;
+ int64_t primary_id = layout.primary_id;
SetPrimaryDisplayId(primary_id == gfx::Display::kInvalidDisplayID
? pair.first
: primary_id);
« no previous file with comments | « ash/display/window_tree_host_manager.h ('k') | ash/display/window_tree_host_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698