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

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

Issue 2009853002: Finish eliminating PlatformWindowMus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean-up and add TODO to WTHM Created 4 years, 7 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
« no previous file with comments | « no previous file | ui/views/mus/BUILD.gn » ('j') | ui/views/mus/native_widget_mus.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a46f89d656dfe7a41f49fe855782c92ee0ea5b8f..da7fd6227b78c7e3430fa07dfcd07d093e99c047 100644
--- a/ui/platform_window/stub/stub_window.cc
+++ b/ui/platform_window/stub/stub_window.cc
@@ -9,7 +9,8 @@
namespace ui {
StubWindow::StubWindow(PlatformWindowDelegate* delegate) : delegate_(delegate) {
- delegate_->OnAcceleratedWidgetAvailable(gfx::kNullAcceleratedWidget, 1.f);
+ if (delegate_)
+ delegate_->OnAcceleratedWidgetAvailable(gfx::kNullAcceleratedWidget, 1.f);
}
StubWindow::~StubWindow() {
@@ -22,14 +23,16 @@ void StubWindow::Hide() {
}
void StubWindow::Close() {
- delegate_->OnClosed();
+ if (delegate_)
+ delegate_->OnClosed();
}
void StubWindow::SetBounds(const gfx::Rect& bounds) {
if (bounds_ == bounds)
return;
bounds_ = bounds;
- delegate_->OnBoundsChanged(bounds);
+ if (delegate_)
+ delegate_->OnBoundsChanged(bounds);
}
gfx::Rect StubWindow::GetBounds() {
« no previous file with comments | « no previous file | ui/views/mus/BUILD.gn » ('j') | ui/views/mus/native_widget_mus.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698