| 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 "ui/aura/test/test_window_delegate.h" | 5 #include "ui/aura/test/test_window_delegate.h" |
| 6 | 6 |
| 7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
| 8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
| 9 #include "ui/base/events/event.h" | 9 #include "ui/base/events/event.h" |
| 10 #include "ui/base/hit_test.h" | 10 #include "ui/base/hit_test.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 return false; | 94 return false; |
| 95 } | 95 } |
| 96 | 96 |
| 97 void TestWindowDelegate::GetHitTestMask(gfx::Path* mask) const { | 97 void TestWindowDelegate::GetHitTestMask(gfx::Path* mask) const { |
| 98 } | 98 } |
| 99 | 99 |
| 100 scoped_refptr<ui::Texture> TestWindowDelegate::CopyTexture() { | 100 scoped_refptr<ui::Texture> TestWindowDelegate::CopyTexture() { |
| 101 return scoped_refptr<ui::Texture>(); | 101 return scoped_refptr<ui::Texture>(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 ui::EventResult TestWindowDelegate::OnKeyEvent(ui::KeyEvent* event) { | |
| 105 return ui::ER_UNHANDLED; | |
| 106 } | |
| 107 | |
| 108 ui::EventResult TestWindowDelegate::OnMouseEvent(ui::MouseEvent* event) { | |
| 109 return ui::ER_UNHANDLED; | |
| 110 } | |
| 111 | |
| 112 ui::EventResult TestWindowDelegate::OnTouchEvent(ui::TouchEvent* event) { | |
| 113 return ui::ER_UNHANDLED; | |
| 114 } | |
| 115 | |
| 116 ui::EventResult TestWindowDelegate::OnGestureEvent( | |
| 117 ui::GestureEvent* event) { | |
| 118 return ui::ER_UNHANDLED; | |
| 119 } | |
| 120 | |
| 121 //////////////////////////////////////////////////////////////////////////////// | 104 //////////////////////////////////////////////////////////////////////////////// |
| 122 // ColorTestWindowDelegate | 105 // ColorTestWindowDelegate |
| 123 | 106 |
| 124 ColorTestWindowDelegate::ColorTestWindowDelegate(SkColor color) | 107 ColorTestWindowDelegate::ColorTestWindowDelegate(SkColor color) |
| 125 : color_(color), | 108 : color_(color), |
| 126 last_key_code_(ui::VKEY_UNKNOWN) { | 109 last_key_code_(ui::VKEY_UNKNOWN) { |
| 127 } | 110 } |
| 128 ColorTestWindowDelegate::~ColorTestWindowDelegate() { | 111 ColorTestWindowDelegate::~ColorTestWindowDelegate() { |
| 129 } | 112 } |
| 130 | 113 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 std::string result = StringPrintf("%d %d", | 211 std::string result = StringPrintf("%d %d", |
| 229 key_press_count_, | 212 key_press_count_, |
| 230 key_release_count_); | 213 key_release_count_); |
| 231 key_press_count_ = 0; | 214 key_press_count_ = 0; |
| 232 key_release_count_ = 0; | 215 key_release_count_ = 0; |
| 233 return result; | 216 return result; |
| 234 } | 217 } |
| 235 | 218 |
| 236 } // namespace test | 219 } // namespace test |
| 237 } // namespace aura | 220 } // namespace aura |
| OLD | NEW |