| 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/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
| 9 #include "ui/base/hit_test.h" | 9 #include "ui/base/hit_test.h" |
| 10 #include "ui/compositor/paint_recorder.h" | 10 #include "ui/compositor/paint_recorder.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 last_key_code_ = event->key_code(); | 117 last_key_code_ = event->key_code(); |
| 118 event->SetHandled(); | 118 event->SetHandled(); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void ColorTestWindowDelegate::OnWindowDestroyed(Window* window) { | 121 void ColorTestWindowDelegate::OnWindowDestroyed(Window* window) { |
| 122 delete this; | 122 delete this; |
| 123 } | 123 } |
| 124 | 124 |
| 125 void ColorTestWindowDelegate::OnPaint(const ui::PaintContext& context) { | 125 void ColorTestWindowDelegate::OnPaint(const ui::PaintContext& context) { |
| 126 ui::PaintRecorder recorder(context, window_size_); | 126 ui::PaintRecorder recorder(context, window_size_); |
| 127 recorder.canvas()->DrawColor(color_, SkXfermode::kSrc_Mode); | 127 recorder.canvas()->DrawColor(color_, SkBlendMode::kSrc); |
| 128 } | 128 } |
| 129 | 129 |
| 130 //////////////////////////////////////////////////////////////////////////////// | 130 //////////////////////////////////////////////////////////////////////////////// |
| 131 // MaskedWindowDelegate | 131 // MaskedWindowDelegate |
| 132 | 132 |
| 133 MaskedWindowDelegate::MaskedWindowDelegate(const gfx::Rect mask_rect) | 133 MaskedWindowDelegate::MaskedWindowDelegate(const gfx::Rect mask_rect) |
| 134 : mask_rect_(mask_rect) { | 134 : mask_rect_(mask_rect) { |
| 135 } | 135 } |
| 136 | 136 |
| 137 bool MaskedWindowDelegate::HasHitTestMask() const { | 137 bool MaskedWindowDelegate::HasHitTestMask() const { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 } | 225 } |
| 226 | 226 |
| 227 int EventCountDelegate::GetGestureCountAndReset() { | 227 int EventCountDelegate::GetGestureCountAndReset() { |
| 228 int gesture_count = gesture_count_; | 228 int gesture_count = gesture_count_; |
| 229 gesture_count_ = 0; | 229 gesture_count_ = 0; |
| 230 return gesture_count; | 230 return gesture_count; |
| 231 } | 231 } |
| 232 | 232 |
| 233 } // namespace test | 233 } // namespace test |
| 234 } // namespace aura | 234 } // namespace aura |
| OLD | NEW |