Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: services/ui/demo/mus_demo.cc

Issue 2568303006: aura-mus: Implement Deactivate(). (Closed)
Patch Set: Prune comments and other debugging gunk. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 void MusDemo::OnWmDeactivateWindow(aura::Window* window) {}
218
217 void MusDemo::DrawFrame() { 219 void MusDemo::DrawFrame() {
218 base::TimeTicks now = base::TimeTicks::Now(); 220 base::TimeTicks now = base::TimeTicks::Now();
219 221
220 VLOG(1) << (now - last_draw_frame_time_).InMilliseconds() 222 VLOG(1) << (now - last_draw_frame_time_).InMilliseconds()
221 << "ms since the last frame was drawn."; 223 << "ms since the last frame was drawn.";
222 last_draw_frame_time_ = now; 224 last_draw_frame_time_ = now;
223 225
224 angle_ += 2.0; 226 angle_ += 2.0;
225 if (angle_ >= 360.0) 227 if (angle_ >= 360.0)
226 angle_ = 0.0; 228 angle_ = 0.0;
(...skipping 16 matching lines...) Expand all
243 gfx::ImageSkiaRep image_skia_rep(bitmap, 1); 245 gfx::ImageSkiaRep image_skia_rep(bitmap, 1);
244 gfx::ImageSkia image_skia(image_skia_rep); 246 gfx::ImageSkia image_skia(image_skia_rep);
245 gfx::Image image(image_skia); 247 gfx::Image image(image_skia);
246 248
247 window_delegate_->SetImage(image); 249 window_delegate_->SetImage(image);
248 bitmap_window_->SchedulePaintInRect(bitmap_window_->bounds()); 250 bitmap_window_->SchedulePaintInRect(bitmap_window_->bounds());
249 } 251 }
250 252
251 } // namespace demo 253 } // namespace demo
252 } // namespace aura 254 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698