| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 void MusDemo::OnEmbed( | 102 void MusDemo::OnEmbed( |
| 103 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { | 103 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { |
| 104 // Not called for the WindowManager. | 104 // Not called for the WindowManager. |
| 105 NOTREACHED(); | 105 NOTREACHED(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void MusDemo::OnUnembed(aura::Window* root) { | 108 void MusDemo::OnUnembed(aura::Window* root) { |
| 109 NOTREACHED(); | 109 NOTREACHED(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void MusDemo::OnEmbedRootDestroyed(aura::Window* root) { | 112 void MusDemo::OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) { |
| 113 // Not called for the WindowManager. | 113 // Not called for the WindowManager. |
| 114 NOTREACHED(); | 114 NOTREACHED(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void MusDemo::OnLostConnection(aura::WindowTreeClient* client) { | 117 void MusDemo::OnLostConnection(aura::WindowTreeClient* client) { |
| 118 root_window_ = nullptr; | 118 root_window_ = nullptr; |
| 119 window_tree_client_.reset(); | 119 window_tree_client_.reset(); |
| 120 timer_.Stop(); | 120 timer_.Stop(); |
| 121 } | 121 } |
| 122 | 122 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 gfx::ImageSkiaRep image_skia_rep(bitmap_, 1); | 242 gfx::ImageSkiaRep image_skia_rep(bitmap_, 1); |
| 243 gfx::ImageSkia image_skia(image_skia_rep); | 243 gfx::ImageSkia image_skia(image_skia_rep); |
| 244 gfx::Image image(image_skia); | 244 gfx::Image image(image_skia); |
| 245 | 245 |
| 246 window_delegate_->SetImage(image); | 246 window_delegate_->SetImage(image); |
| 247 bitmap_window_->SchedulePaintInRect(bitmap_window_->bounds()); | 247 bitmap_window_->SchedulePaintInRect(bitmap_window_->bounds()); |
| 248 } | 248 } |
| 249 | 249 |
| 250 } // namespace demo | 250 } // namespace demo |
| 251 } // namespace aura | 251 } // namespace aura |
| OLD | NEW |