OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |