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/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 VisibleBoundsView() : received_notification_(false) {} | 1801 VisibleBoundsView() : received_notification_(false) {} |
1802 virtual ~VisibleBoundsView() {} | 1802 virtual ~VisibleBoundsView() {} |
1803 | 1803 |
1804 bool received_notification() const { return received_notification_; } | 1804 bool received_notification() const { return received_notification_; } |
1805 void set_received_notification(bool received) { | 1805 void set_received_notification(bool received) { |
1806 received_notification_ = received; | 1806 received_notification_ = received; |
1807 } | 1807 } |
1808 | 1808 |
1809 private: | 1809 private: |
1810 // Overridden from View: | 1810 // Overridden from View: |
1811 virtual bool NeedsNotificationWhenVisibleBoundsChange() const OVERRIDE { | 1811 virtual bool GetNeedsNotificationWhenVisibleBoundsChange() const OVERRIDE { |
1812 return true; | 1812 return true; |
1813 } | 1813 } |
1814 virtual void OnVisibleBoundsChanged() OVERRIDE { | 1814 virtual void OnVisibleBoundsChanged() OVERRIDE { |
1815 received_notification_ = true; | 1815 received_notification_ = true; |
1816 } | 1816 } |
1817 | 1817 |
1818 bool received_notification_; | 1818 bool received_notification_; |
1819 | 1819 |
1820 DISALLOW_COPY_AND_ASSIGN(VisibleBoundsView); | 1820 DISALLOW_COPY_AND_ASSIGN(VisibleBoundsView); |
1821 }; | 1821 }; |
(...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3698 // notification. | 3698 // notification. |
3699 TestView* test_view_child_2 = new TestView(); | 3699 TestView* test_view_child_2 = new TestView(); |
3700 test_view->AddChildView(test_view_child_2); | 3700 test_view->AddChildView(test_view_child_2); |
3701 EXPECT_TRUE(test_view_child_2->native_theme_); | 3701 EXPECT_TRUE(test_view_child_2->native_theme_); |
3702 EXPECT_EQ(widget->GetNativeTheme(), test_view_child_2->native_theme_); | 3702 EXPECT_EQ(widget->GetNativeTheme(), test_view_child_2->native_theme_); |
3703 | 3703 |
3704 widget->CloseNow(); | 3704 widget->CloseNow(); |
3705 } | 3705 } |
3706 | 3706 |
3707 } // namespace views | 3707 } // namespace views |
OLD | NEW |