1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/views/test/test_widget_observer.h"
7 #include "base/logging.h"
8 #include "ui/views/widget/widget.h"
13 TestWidgetObserver::TestWidgetObserver(Widget
* widget
)
15 widget_
->AddObserver(this);
18 TestWidgetObserver::~TestWidgetObserver() {
20 widget_
->RemoveObserver(this);
23 void TestWidgetObserver::OnWidgetDestroying(Widget
* widget
) {
24 DCHECK_EQ(widget_
, widget
);