Commit 5bdbd3c8 authored by Minju Kim's avatar Minju Kim Committed by Commit Bot

Add const qualifier to PlatformWindow::GetBounds method

This CL is a precursor of https://crrev.com/c/2419056.

Bug: 1126828
Change-Id: I629123a6eae153825355b6b2820ac6ce924f05f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2490913
Commit-Queue: MINJU KIM <mkim@igalia.com>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarMaksim Sisov (GMT+2) <msisov@igalia.com>
Reviewed-by: default avatarAntonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823424}
parent 86f652aa
......@@ -81,7 +81,7 @@ void DrmWindowHost::SetBounds(const gfx::Rect& bounds) {
SendBoundsChange();
}
gfx::Rect DrmWindowHost::GetBounds() {
gfx::Rect DrmWindowHost::GetBounds() const {
return bounds_;
}
......
......@@ -62,7 +62,7 @@ class DrmWindowHost : public PlatformWindow,
bool IsVisible() const override;
void PrepareForShutdown() override;
void SetBounds(const gfx::Rect& bounds) override;
gfx::Rect GetBounds() override;
gfx::Rect GetBounds() const override;
void SetTitle(const base::string16& title) override;
void SetCapture() override;
void ReleaseCapture() override;
......
......@@ -83,7 +83,7 @@ void ScenicWindow::AttachSurfaceView(
[](fuchsia::scenic::scheduling::FuturePresentationTimes info) {});
}
gfx::Rect ScenicWindow::GetBounds() {
gfx::Rect ScenicWindow::GetBounds() const {
return bounds_;
}
......
......@@ -50,7 +50,7 @@ class COMPONENT_EXPORT(OZONE) ScenicWindow
void AttachSurfaceView(fuchsia::ui::views::ViewHolderToken token);
// PlatformWindow implementation.
gfx::Rect GetBounds() override;
gfx::Rect GetBounds() const override;
void SetBounds(const gfx::Rect& bounds) override;
void SetTitle(const base::string16& title) override;
void Show(bool inactive) override;
......
......@@ -149,7 +149,7 @@ void WaylandWindow::SetBounds(const gfx::Rect& bounds_px) {
delegate_->OnBoundsChanged(bounds_px_);
}
gfx::Rect WaylandWindow::GetBounds() {
gfx::Rect WaylandWindow::GetBounds() const {
return bounds_px_;
}
......
......@@ -118,7 +118,7 @@ class WaylandWindow : public PlatformWindow, public PlatformEventDispatcher {
bool IsVisible() const override;
void PrepareForShutdown() override;
void SetBounds(const gfx::Rect& bounds) override;
gfx::Rect GetBounds() override;
gfx::Rect GetBounds() const override;
void SetTitle(const base::string16& title) override;
void SetCapture() override;
void ReleaseCapture() override;
......
......@@ -50,7 +50,7 @@ class COMPONENT_EXPORT(PLATFORM_WINDOW) PlatformWindow
// Sets and gets the bounds of the platform-window. Note that the bounds is in
// physical pixel coordinates.
virtual void SetBounds(const gfx::Rect& bounds) = 0;
virtual gfx::Rect GetBounds() = 0;
virtual gfx::Rect GetBounds() const = 0;
virtual void SetTitle(const base::string16& title) = 0;
......
......@@ -43,7 +43,7 @@ void StubWindow::SetBounds(const gfx::Rect& bounds) {
delegate_->OnBoundsChanged(bounds);
}
gfx::Rect StubWindow::GetBounds() {
gfx::Rect StubWindow::GetBounds() const {
return bounds_;
}
......
......@@ -34,7 +34,7 @@ class STUB_WINDOW_EXPORT StubWindow : public PlatformWindow {
bool IsVisible() const override;
void PrepareForShutdown() override;
void SetBounds(const gfx::Rect& bounds) override;
gfx::Rect GetBounds() override;
gfx::Rect GetBounds() const override;
void SetTitle(const base::string16& title) override;
void SetCapture() override;
void ReleaseCapture() override;
......
......@@ -93,7 +93,7 @@ void WinWindow::SetBounds(const gfx::Rect& bounds) {
window_bounds.width(), window_bounds.height(), flags);
}
gfx::Rect WinWindow::GetBounds() {
gfx::Rect WinWindow::GetBounds() const {
RECT cr;
GetClientRect(hwnd(), &cr);
return gfx::Rect(cr);
......
......@@ -33,7 +33,7 @@ class WIN_WINDOW_EXPORT WinWindow : public PlatformWindow,
bool IsVisible() const override;
void PrepareForShutdown() override;
void SetBounds(const gfx::Rect& bounds) override;
gfx::Rect GetBounds() override;
gfx::Rect GetBounds() const override;
void SetTitle(const base::string16& title) override;
void SetCapture() override;
void ReleaseCapture() override;
......
......@@ -240,7 +240,7 @@ void X11Window::SetBounds(const gfx::Rect& bounds) {
XWindow::SetBounds(bounds_in_pixels);
}
gfx::Rect X11Window::GetBounds() {
gfx::Rect X11Window::GetBounds() const {
return XWindow::bounds();
}
......
......@@ -77,7 +77,7 @@ class X11_WINDOW_EXPORT X11Window : public PlatformWindow,
bool IsVisible() const override;
void PrepareForShutdown() override;
void SetBounds(const gfx::Rect& bounds) override;
gfx::Rect GetBounds() override;
gfx::Rect GetBounds() const override;
void SetTitle(const base::string16& title) override;
void SetCapture() override;
void ReleaseCapture() override;
......
......@@ -40,7 +40,7 @@ class FakePlatformWindow : public ui::PlatformWindow, public ui::WmDragHandler {
bool IsVisible() const override { return true; }
void PrepareForShutdown() override {}
void SetBounds(const gfx::Rect& bounds) override {}
gfx::Rect GetBounds() override { return gfx::Rect(); }
gfx::Rect GetBounds() const override { return gfx::Rect(); }
void SetTitle(const base::string16& title) override {}
void SetCapture() override {}
void ReleaseCapture() override {}
......
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