| 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 "ui/aura/test/test_window_delegate.h" | 5 #include "ui/aura/test/test_window_delegate.h" |
| 6 | 6 |
| 7 #include "third_party/skia/include/core/SkCanvas.h" | 7 #include "third_party/skia/include/core/SkCanvas.h" |
| 8 #include "ui/aura/event.h" | 8 #include "ui/aura/event.h" |
| 9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
| 10 #include "ui/base/hit_test.h" | 10 #include "ui/base/hit_test.h" |
| 11 #include "ui/gfx/canvas.h" | 11 #include "ui/gfx/canvas.h" |
| 12 | 12 |
| 13 namespace aura { | 13 namespace aura { |
| 14 namespace test { | 14 namespace test { |
| 15 | 15 |
| 16 //////////////////////////////////////////////////////////////////////////////// | 16 //////////////////////////////////////////////////////////////////////////////// |
| 17 // TestWindowDelegate | 17 // TestWindowDelegate |
| 18 | 18 |
| 19 TestWindowDelegate::TestWindowDelegate() { | 19 TestWindowDelegate::TestWindowDelegate() : accept_events_(true) { |
| 20 } | 20 } |
| 21 | 21 |
| 22 TestWindowDelegate::~TestWindowDelegate() { | 22 TestWindowDelegate::~TestWindowDelegate() { |
| 23 } | 23 } |
| 24 | 24 |
| 25 void TestWindowDelegate::OnBoundsChanged(const gfx::Rect& old_bounds, | 25 void TestWindowDelegate::OnBoundsChanged(const gfx::Rect& old_bounds, |
| 26 const gfx::Rect& new_bounds) { | 26 const gfx::Rect& new_bounds) { |
| 27 } | 27 } |
| 28 | 28 |
| 29 void TestWindowDelegate::OnFocus() { | 29 void TestWindowDelegate::OnFocus() { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 49 } | 49 } |
| 50 | 50 |
| 51 ui::TouchStatus TestWindowDelegate::OnTouchEvent(TouchEvent* event) { | 51 ui::TouchStatus TestWindowDelegate::OnTouchEvent(TouchEvent* event) { |
| 52 return ui::TOUCH_STATUS_UNKNOWN; | 52 return ui::TOUCH_STATUS_UNKNOWN; |
| 53 } | 53 } |
| 54 | 54 |
| 55 bool TestWindowDelegate::ShouldActivate(Event* event) { | 55 bool TestWindowDelegate::ShouldActivate(Event* event) { |
| 56 return true; | 56 return true; |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool TestWindowDelegate::ShouldAcceptEvents() { |
| 60 return accept_events_; |
| 61 } |
| 62 |
| 59 void TestWindowDelegate::OnActivated() { | 63 void TestWindowDelegate::OnActivated() { |
| 60 } | 64 } |
| 61 | 65 |
| 62 void TestWindowDelegate::OnLostActive() { | 66 void TestWindowDelegate::OnLostActive() { |
| 63 } | 67 } |
| 64 | 68 |
| 65 void TestWindowDelegate::OnCaptureLost() { | 69 void TestWindowDelegate::OnCaptureLost() { |
| 66 } | 70 } |
| 67 | 71 |
| 68 void TestWindowDelegate::OnPaint(gfx::Canvas* canvas) { | 72 void TestWindowDelegate::OnPaint(gfx::Canvas* canvas) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 } | 126 } |
| 123 void ActivateWindowDelegate::OnActivated() { | 127 void ActivateWindowDelegate::OnActivated() { |
| 124 activated_count_++; | 128 activated_count_++; |
| 125 } | 129 } |
| 126 void ActivateWindowDelegate::OnLostActive() { | 130 void ActivateWindowDelegate::OnLostActive() { |
| 127 lost_active_count_++; | 131 lost_active_count_++; |
| 128 } | 132 } |
| 129 | 133 |
| 130 } // namespace test | 134 } // namespace test |
| 131 } // namespace aura | 135 } // namespace aura |
| OLD | NEW |