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

Side by Side Diff: ui/views/test/test_widget_observer.cc

Issue 11639012: Add tests to verify accelerators properly work on constrained window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/test/test_widget_observer.h ('k') | ui/views/views.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "ui/views/test/test_widget_observer.h"
6
7 #include "base/logging.h"
8 #include "ui/views/widget/widget.h"
9
10 namespace views {
11 namespace test {
12
13 TestWidgetObserver::TestWidgetObserver(Widget* widget)
14 : widget_(widget) {
15 widget_->AddObserver(this);
16 }
17
18 TestWidgetObserver::~TestWidgetObserver() {
19 if (widget_)
20 widget_->RemoveObserver(this);
21 }
22
23 void TestWidgetObserver::OnWidgetClosing(Widget* widget) {
24 DCHECK_EQ(widget_, widget);
25 widget_ = NULL;
26 }
27
28 } // namespace test
29 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/test_widget_observer.h ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698