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 <algorithm> | 5 #include <algorithm> |
6 #include <memory> | 6 #include <memory> |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2071 class WidgetBoundsObserver : public WidgetObserver { | 2071 class WidgetBoundsObserver : public WidgetObserver { |
2072 public: | 2072 public: |
2073 WidgetBoundsObserver() {} | 2073 WidgetBoundsObserver() {} |
2074 ~WidgetBoundsObserver() override {} | 2074 ~WidgetBoundsObserver() override {} |
2075 | 2075 |
2076 gfx::Rect bounds() { return bounds_; } | 2076 gfx::Rect bounds() { return bounds_; } |
2077 | 2077 |
2078 // WidgetObserver: | 2078 // WidgetObserver: |
2079 void OnWidgetDestroying(Widget* widget) override { | 2079 void OnWidgetDestroying(Widget* widget) override { |
2080 EXPECT_TRUE(widget->GetNativeWindow()); | 2080 EXPECT_TRUE(widget->GetNativeWindow()); |
| 2081 EXPECT_TRUE(Widget::GetWidgetForNativeWindow(widget->GetNativeWindow())); |
2081 bounds_ = widget->GetWindowBoundsInScreen(); | 2082 bounds_ = widget->GetWindowBoundsInScreen(); |
2082 } | 2083 } |
2083 | 2084 |
2084 private: | 2085 private: |
2085 gfx::Rect bounds_; | 2086 gfx::Rect bounds_; |
2086 | 2087 |
2087 DISALLOW_COPY_AND_ASSIGN(WidgetBoundsObserver); | 2088 DISALLOW_COPY_AND_ASSIGN(WidgetBoundsObserver); |
2088 }; | 2089 }; |
2089 | 2090 |
2090 // Verifies Close() results in destroying. | 2091 // Verifies Close() results in destroying. |
(...skipping 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3828 Transparency_DesktopWidgetTranslucent | 3829 Transparency_DesktopWidgetTranslucent |
3829 #endif | 3830 #endif |
3830 TEST_F(CompositingWidgetTest, MAYBE_Transparency_DesktopWidgetTranslucent) { | 3831 TEST_F(CompositingWidgetTest, MAYBE_Transparency_DesktopWidgetTranslucent) { |
3831 CheckAllWidgetsForOpacity(Widget::InitParams::TRANSLUCENT_WINDOW); | 3832 CheckAllWidgetsForOpacity(Widget::InitParams::TRANSLUCENT_WINDOW); |
3832 } | 3833 } |
3833 | 3834 |
3834 #endif // !defined(OS_CHROMEOS) | 3835 #endif // !defined(OS_CHROMEOS) |
3835 | 3836 |
3836 } // namespace test | 3837 } // namespace test |
3837 } // namespace views | 3838 } // namespace views |
OLD | NEW |