| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "ui/aura/aura_test_base.h" | 8 #include "ui/aura/aura_test_base.h" |
| 9 #include "ui/aura/desktop.h" | 9 #include "ui/aura/desktop.h" |
| 10 #include "ui/aura/event.h" | 10 #include "ui/aura/event.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 return HTCLIENT; | 46 return HTCLIENT; |
| 47 } | 47 } |
| 48 virtual bool OnMouseEvent(MouseEvent* event) OVERRIDE { return false; } | 48 virtual bool OnMouseEvent(MouseEvent* event) OVERRIDE { return false; } |
| 49 virtual bool ShouldActivate(MouseEvent* event) OVERRIDE { return true; } | 49 virtual bool ShouldActivate(MouseEvent* event) OVERRIDE { return true; } |
| 50 virtual void OnActivated() OVERRIDE {} | 50 virtual void OnActivated() OVERRIDE {} |
| 51 virtual void OnLostActive() OVERRIDE {} | 51 virtual void OnLostActive() OVERRIDE {} |
| 52 virtual void OnCaptureLost() OVERRIDE {} | 52 virtual void OnCaptureLost() OVERRIDE {} |
| 53 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {} | 53 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {} |
| 54 virtual void OnWindowDestroying() OVERRIDE {} | 54 virtual void OnWindowDestroying() OVERRIDE {} |
| 55 virtual void OnWindowDestroyed() OVERRIDE {} | 55 virtual void OnWindowDestroyed() OVERRIDE {} |
| 56 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE {} |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 DISALLOW_COPY_AND_ASSIGN(WindowDelegateImpl); | 59 DISALLOW_COPY_AND_ASSIGN(WindowDelegateImpl); |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 // Used for verifying destruction methods are invoked. | 62 // Used for verifying destruction methods are invoked. |
| 62 class DestroyTrackingDelegateImpl : public WindowDelegateImpl { | 63 class DestroyTrackingDelegateImpl : public WindowDelegateImpl { |
| 63 public: | 64 public: |
| 64 DestroyTrackingDelegateImpl() | 65 DestroyTrackingDelegateImpl() |
| 65 : destroying_count_(0), | 66 : destroying_count_(0), |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 | 752 |
| 752 // Deactivate w1 and make sure w2 becomes active and frontmost. | 753 // Deactivate w1 and make sure w2 becomes active and frontmost. |
| 753 w1->Deactivate(); | 754 w1->Deactivate(); |
| 754 EXPECT_FALSE(w1->IsActive()); | 755 EXPECT_FALSE(w1->IsActive()); |
| 755 EXPECT_TRUE(w2->IsActive()); | 756 EXPECT_TRUE(w2->IsActive()); |
| 756 EXPECT_EQ(w2.get(), parent->children()[1]); | 757 EXPECT_EQ(w2.get(), parent->children()[1]); |
| 757 } | 758 } |
| 758 | 759 |
| 759 } // namespace internal | 760 } // namespace internal |
| 760 } // namespace aura | 761 } // namespace aura |
| OLD | NEW |