| 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/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "services/shell/public/cpp/connector.h" | 8 #include "services/shell/public/cpp/connector.h" |
| 9 #include "services/ui/common/gpu_service.h" | 9 #include "services/ui/common/gpu_service.h" |
| 10 #include "services/ui/public/cpp/bitmap_uploader.h" | 10 #include "services/ui/public/cpp/bitmap_uploader.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 void MusDemo::OnEmbed(Window* window) { | 77 void MusDemo::OnEmbed(Window* window) { |
| 78 // Not called for the WindowManager. | 78 // Not called for the WindowManager. |
| 79 NOTREACHED(); | 79 NOTREACHED(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void MusDemo::OnDidDestroyClient(WindowTreeClient* client) { | 82 void MusDemo::OnDidDestroyClient(WindowTreeClient* client) { |
| 83 window_tree_client_ = nullptr; | 83 window_tree_client_ = nullptr; |
| 84 timer_.Stop(); | 84 timer_.Stop(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void MusDemo::OnEventObserved(const Event& event, Window* target) {} | 87 void MusDemo::OnPointerWatcherEvent(const PointerEvent& event, Window* target) { |
| 88 } |
| 88 | 89 |
| 89 void MusDemo::SetWindowManagerClient(WindowManagerClient* client) {} | 90 void MusDemo::SetWindowManagerClient(WindowManagerClient* client) {} |
| 90 | 91 |
| 91 bool MusDemo::OnWmSetBounds(Window* window, gfx::Rect* bounds) { | 92 bool MusDemo::OnWmSetBounds(Window* window, gfx::Rect* bounds) { |
| 92 return true; | 93 return true; |
| 93 } | 94 } |
| 94 | 95 |
| 95 bool MusDemo::OnWmSetProperty(Window* window, | 96 bool MusDemo::OnWmSetProperty(Window* window, |
| 96 const std::string& name, | 97 const std::string& name, |
| 97 std::unique_ptr<std::vector<uint8_t>>* new_data) { | 98 std::unique_ptr<std::vector<uint8_t>>* new_data) { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 new std::vector<unsigned char>(addr, addr + bytes)); | 174 new std::vector<unsigned char>(addr, addr + bytes)); |
| 174 bitmap_.unlockPixels(); | 175 bitmap_.unlockPixels(); |
| 175 | 176 |
| 176 // Send frame to MUS via BitmapUploader. | 177 // Send frame to MUS via BitmapUploader. |
| 177 uploader_->SetBitmap(bounds.width(), bounds.height(), std::move(data), | 178 uploader_->SetBitmap(bounds.width(), bounds.height(), std::move(data), |
| 178 ui::BitmapUploader::BGRA); | 179 ui::BitmapUploader::BGRA); |
| 179 } | 180 } |
| 180 | 181 |
| 181 } // namespace demo | 182 } // namespace demo |
| 182 } // namespace ui | 183 } // namespace ui |
| OLD | NEW |