Commit ec8c36d4 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

aura: cleanup function/member name in WindowTreeHostMus

Renames in_set_bounds_from_server to is_server_setting_bounds, which is
hopefully a bit easier to understand.

BUG=none
TEST=none

Change-Id: Ic972be85123dc234fa98baee4d2d602bbcc84a03
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1507324
Auto-Submit: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638676}
parent 6bec1731
...@@ -202,7 +202,7 @@ void WindowTreeHostMus::SetBounds( ...@@ -202,7 +202,7 @@ void WindowTreeHostMus::SetBounds(
const gfx::Rect pixel_bounds( const gfx::Rect pixel_bounds(
gfx::ScaleToFlooredPoint(bounds_in_dip.origin(), dsf), gfx::ScaleToFlooredPoint(bounds_in_dip.origin(), dsf),
gfx::ScaleToCeiledSize(bounds_in_dip.size(), dsf)); gfx::ScaleToCeiledSize(bounds_in_dip.size(), dsf));
if (!in_set_bounds_from_server_) { if (!is_server_setting_bounds_) {
// Update the LocalSurfaceIdAllocation here, rather than in WindowTreeHost // Update the LocalSurfaceIdAllocation here, rather than in WindowTreeHost
// as WindowTreeClient (the delegate) needs that information before // as WindowTreeClient (the delegate) needs that information before
// OnWindowTreeHostBoundsWillChange(). // OnWindowTreeHostBoundsWillChange().
...@@ -223,7 +223,7 @@ void WindowTreeHostMus::SetBounds( ...@@ -223,7 +223,7 @@ void WindowTreeHostMus::SetBounds(
void WindowTreeHostMus::SetBoundsFromServer( void WindowTreeHostMus::SetBoundsFromServer(
const gfx::Rect& bounds, const gfx::Rect& bounds,
const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) { const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) {
base::AutoReset<bool> resetter(&in_set_bounds_from_server_, true); base::AutoReset<bool> resetter(&is_server_setting_bounds_, true);
SetBounds(bounds, local_surface_id_allocation); SetBounds(bounds, local_surface_id_allocation);
} }
......
...@@ -127,7 +127,7 @@ class AURA_EXPORT WindowTreeHostMus : public WindowTreeHostPlatform, ...@@ -127,7 +127,7 @@ class AURA_EXPORT WindowTreeHostMus : public WindowTreeHostPlatform,
const viz::LocalSurfaceIdAllocation& local_surface_id_allocation = const viz::LocalSurfaceIdAllocation& local_surface_id_allocation =
viz::LocalSurfaceIdAllocation()) override; viz::LocalSurfaceIdAllocation()) override;
bool in_set_bounds_from_server() const { return in_set_bounds_from_server_; } bool is_server_setting_bounds() const { return is_server_setting_bounds_; }
private: private:
int64_t display_id_; int64_t display_id_;
...@@ -135,7 +135,7 @@ class AURA_EXPORT WindowTreeHostMus : public WindowTreeHostPlatform, ...@@ -135,7 +135,7 @@ class AURA_EXPORT WindowTreeHostMus : public WindowTreeHostPlatform,
WindowTreeHostMusDelegate* delegate_; WindowTreeHostMusDelegate* delegate_;
// If true, the server initiated the bounds change. // If true, the server initiated the bounds change.
bool in_set_bounds_from_server_ = false; bool is_server_setting_bounds_ = false;
std::unique_ptr<InputMethodMus> input_method_; std::unique_ptr<InputMethodMus> input_method_;
......
...@@ -1046,7 +1046,7 @@ void DesktopWindowTreeHostMus::SetBounds( ...@@ -1046,7 +1046,7 @@ void DesktopWindowTreeHostMus::SetBounds(
const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) { const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) {
gfx::Rect final_bounds = bounds; gfx::Rect final_bounds = bounds;
// If the server initiated the bounds change, then we need to honor it. // If the server initiated the bounds change, then we need to honor it.
if (!in_set_bounds_from_server() && bounds_in_dip().size() != bounds.size()) { if (!is_server_setting_bounds() && bounds_in_dip().size() != bounds.size()) {
gfx::Size size = bounds.size(); gfx::Size size = bounds.size();
size.SetToMax(native_widget_delegate_->GetMinimumSize()); size.SetToMax(native_widget_delegate_->GetMinimumSize());
const gfx::Size max_size = native_widget_delegate_->GetMaximumSize(); const gfx::Size max_size = native_widget_delegate_->GetMaximumSize();
...@@ -1065,7 +1065,7 @@ void DesktopWindowTreeHostMus::SetBoundsInPixels( ...@@ -1065,7 +1065,7 @@ void DesktopWindowTreeHostMus::SetBoundsInPixels(
// WindowTreeHost exposes SetBoundsInPixels() this function may be called too. // WindowTreeHost exposes SetBoundsInPixels() this function may be called too.
// If the server initiated the bounds change, then we need to honor it. // If the server initiated the bounds change, then we need to honor it.
gfx::Rect final_bounds_in_pixels = bounds_in_pixels; gfx::Rect final_bounds_in_pixels = bounds_in_pixels;
if (!in_set_bounds_from_server() && if (!is_server_setting_bounds() &&
GetBoundsInPixels().size() != bounds_in_pixels.size()) { GetBoundsInPixels().size() != bounds_in_pixels.size()) {
gfx::Size size = bounds_in_pixels.size(); gfx::Size size = bounds_in_pixels.size();
size.SetToMax(gfx::ConvertSizeToPixel( size.SetToMax(gfx::ConvertSizeToPixel(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment