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

Side by Side Diff: ui/views/view_unittest.cc

Issue 14061025: ui: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/mouse_watcher.cc ('k') | ui/views/widget/aero_tooltip_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <map> 5 #include <map>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 closeable_(false), 1595 closeable_(false),
1596 widget_(NULL) { 1596 widget_(NULL) {
1597 } 1597 }
1598 1598
1599 void TearDown() { 1599 void TearDown() {
1600 // Now we can close safely. 1600 // Now we can close safely.
1601 closeable_ = true; 1601 closeable_ = true;
1602 widget_->Close(); 1602 widget_->Close();
1603 widget_ = NULL; 1603 widget_ = NULL;
1604 // delegate has to be alive while shutting down. 1604 // delegate has to be alive while shutting down.
1605 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 1605 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
1606 } 1606 }
1607 1607
1608 // DialogDelegate implementation: 1608 // DialogDelegate implementation:
1609 virtual int GetDefaultDialogButton() const OVERRIDE { 1609 virtual int GetDefaultDialogButton() const OVERRIDE {
1610 return ui::DIALOG_BUTTON_OK; 1610 return ui::DIALOG_BUTTON_OK;
1611 } 1611 }
1612 1612
1613 virtual View* GetContentsView() OVERRIDE { 1613 virtual View* GetContentsView() OVERRIDE {
1614 if (!contents_) { 1614 if (!contents_) {
1615 contents_ = new View; 1615 contents_ = new View;
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after
3373 // Set to non default value. 3373 // Set to non default value.
3374 v->layer()->set_scale_content(false); 3374 v->layer()->set_scale_content(false);
3375 scoped_ptr<ui::Layer> old_layer(v->RecreateLayer()); 3375 scoped_ptr<ui::Layer> old_layer(v->RecreateLayer());
3376 ui::Layer* new_layer = v->layer(); 3376 ui::Layer* new_layer = v->layer();
3377 EXPECT_FALSE(new_layer->scale_content()); 3377 EXPECT_FALSE(new_layer->scale_content());
3378 } 3378 }
3379 3379
3380 #endif // USE_AURA 3380 #endif // USE_AURA
3381 3381
3382 } // namespace views 3382 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mouse_watcher.cc ('k') | ui/views/widget/aero_tooltip_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698