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

Unified Diff: ui/platform_window/stub/stub_window.cc

Issue 2040783002: Drop unnecessary override of OnWindowBoundsChanged in NativeWidgetMus::MusWindowObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set delegate in StubWindow to enable normal flow for notifying OnBoundsChanged Created 4 years, 6 months 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
Index: ui/platform_window/stub/stub_window.cc
diff --git a/ui/platform_window/stub/stub_window.cc b/ui/platform_window/stub/stub_window.cc
index da7fd6227b78c7e3430fa07dfcd07d093e99c047..6412a62c662efe881a1e3229a9024c07586ab16f 100644
--- a/ui/platform_window/stub/stub_window.cc
+++ b/ui/platform_window/stub/stub_window.cc
@@ -8,8 +8,11 @@
namespace ui {
-StubWindow::StubWindow(PlatformWindowDelegate* delegate) : delegate_(delegate) {
- if (delegate_)
+StubWindow::StubWindow(PlatformWindowDelegate* delegate,
+ bool use_default_accelerated_widget)
+ : delegate_(delegate) {
+ DCHECK(delegate);
+ if (use_default_accelerated_widget)
delegate_->OnAcceleratedWidgetAvailable(gfx::kNullAcceleratedWidget, 1.f);
}
@@ -23,16 +26,14 @@ void StubWindow::Hide() {
}
void StubWindow::Close() {
- if (delegate_)
- delegate_->OnClosed();
+ delegate_->OnClosed();
}
void StubWindow::SetBounds(const gfx::Rect& bounds) {
if (bounds_ == bounds)
return;
bounds_ = bounds;
- if (delegate_)
- delegate_->OnBoundsChanged(bounds);
+ delegate_->OnBoundsChanged(bounds);
}
gfx::Rect StubWindow::GetBounds() {

Powered by Google App Engine
This is Rietveld 408576698