| 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..bb635531fb75b3d35bfbe060fa93439c553a9b43 100644
|
| --- a/ui/platform_window/stub/stub_window.cc
|
| +++ b/ui/platform_window/stub/stub_window.cc
|
| @@ -4,12 +4,16 @@
|
|
|
| #include "ui/platform_window/stub/stub_window.h"
|
|
|
| +#include "ui/gfx/native_widget_types.h"
|
| #include "ui/platform_window/platform_window_delegate.h"
|
|
|
| namespace ui {
|
|
|
| -StubWindow::StubWindow(PlatformWindowDelegate* delegate) : delegate_(delegate) {
|
| - delegate_->OnAcceleratedWidgetAvailable(gfx::kNullAcceleratedWidget, 1.f);
|
| +StubWindow::StubWindow(
|
| + PlatformWindowDelegate* delegate, gfx::AcceleratedWidget accelerated_widget)
|
| + : delegate_(delegate) {
|
| + if (delegate_)
|
| + delegate_->OnAcceleratedWidgetAvailable(accelerated_widget, 1.f);
|
| }
|
|
|
| StubWindow::~StubWindow() {
|
| @@ -22,14 +26,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() {
|
|
|