| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/ui/demo/mus_demo.h" | 5 #include "services/ui/demo/mus_demo.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "services/service_manager/public/cpp/connector.h" | 9 #include "services/service_manager/public/cpp/connector.h" |
| 10 #include "services/service_manager/public/cpp/service_context.h" | 10 #include "services/service_manager/public/cpp/service_context.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 // Don't care | 207 // Don't care |
| 208 } | 208 } |
| 209 | 209 |
| 210 void MusDemo::OnWmCancelMoveLoop(aura::Window* window) {} | 210 void MusDemo::OnWmCancelMoveLoop(aura::Window* window) {} |
| 211 | 211 |
| 212 void MusDemo::OnWmSetClientArea( | 212 void MusDemo::OnWmSetClientArea( |
| 213 aura::Window* window, | 213 aura::Window* window, |
| 214 const gfx::Insets& insets, | 214 const gfx::Insets& insets, |
| 215 const std::vector<gfx::Rect>& additional_client_areas) {} | 215 const std::vector<gfx::Rect>& additional_client_areas) {} |
| 216 | 216 |
| 217 bool MusDemo::IsWindowActive(aura::Window* window) { return false; } |
| 218 |
| 219 void MusDemo::OnWmDeactivateWindow(aura::Window* window) {} |
| 220 |
| 217 void MusDemo::DrawFrame() { | 221 void MusDemo::DrawFrame() { |
| 218 base::TimeTicks now = base::TimeTicks::Now(); | 222 base::TimeTicks now = base::TimeTicks::Now(); |
| 219 | 223 |
| 220 VLOG(1) << (now - last_draw_frame_time_).InMilliseconds() | 224 VLOG(1) << (now - last_draw_frame_time_).InMilliseconds() |
| 221 << "ms since the last frame was drawn."; | 225 << "ms since the last frame was drawn."; |
| 222 last_draw_frame_time_ = now; | 226 last_draw_frame_time_ = now; |
| 223 | 227 |
| 224 angle_ += 2.0; | 228 angle_ += 2.0; |
| 225 if (angle_ >= 360.0) | 229 if (angle_ >= 360.0) |
| 226 angle_ = 0.0; | 230 angle_ = 0.0; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 243 gfx::ImageSkiaRep image_skia_rep(bitmap, 1); | 247 gfx::ImageSkiaRep image_skia_rep(bitmap, 1); |
| 244 gfx::ImageSkia image_skia(image_skia_rep); | 248 gfx::ImageSkia image_skia(image_skia_rep); |
| 245 gfx::Image image(image_skia); | 249 gfx::Image image(image_skia); |
| 246 | 250 |
| 247 window_delegate_->SetImage(image); | 251 window_delegate_->SetImage(image); |
| 248 bitmap_window_->SchedulePaintInRect(bitmap_window_->bounds()); | 252 bitmap_window_->SchedulePaintInRect(bitmap_window_->bounds()); |
| 249 } | 253 } |
| 250 | 254 |
| 251 } // namespace demo | 255 } // namespace demo |
| 252 } // namespace aura | 256 } // namespace aura |
| OLD | NEW |