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

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

Issue 2183163002: mus: Change PointerWatcher to observe all pointer events, with moves optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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
« no previous file with comments | « services/ui/demo/mus_demo.h ('k') | services/ui/public/cpp/tests/test_window_tree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void MusDemo::OnEmbed(Window* window) { 78 void MusDemo::OnEmbed(Window* window) {
79 // Not called for the WindowManager. 79 // Not called for the WindowManager.
80 NOTREACHED(); 80 NOTREACHED();
81 } 81 }
82 82
83 void MusDemo::OnDidDestroyClient(WindowTreeClient* client) { 83 void MusDemo::OnDidDestroyClient(WindowTreeClient* client) {
84 window_tree_client_ = nullptr; 84 window_tree_client_ = nullptr;
85 timer_.Stop(); 85 timer_.Stop();
86 } 86 }
87 87
88 void MusDemo::OnEventObserved(const Event& event, Window* target) {} 88 void MusDemo::OnPointerEventObserved(const PointerEvent& event,
89 Window* target) {}
89 90
90 void MusDemo::SetWindowManagerClient(WindowManagerClient* client) {} 91 void MusDemo::SetWindowManagerClient(WindowManagerClient* client) {}
91 92
92 bool MusDemo::OnWmSetBounds(Window* window, gfx::Rect* bounds) { 93 bool MusDemo::OnWmSetBounds(Window* window, gfx::Rect* bounds) {
93 return true; 94 return true;
94 } 95 }
95 96
96 bool MusDemo::OnWmSetProperty(Window* window, 97 bool MusDemo::OnWmSetProperty(Window* window,
97 const std::string& name, 98 const std::string& name,
98 std::unique_ptr<std::vector<uint8_t>>* new_data) { 99 std::unique_ptr<std::vector<uint8_t>>* new_data) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 new std::vector<unsigned char>(addr, addr + bytes)); 175 new std::vector<unsigned char>(addr, addr + bytes));
175 bitmap_.unlockPixels(); 176 bitmap_.unlockPixels();
176 177
177 // Send frame to MUS via BitmapUploader. 178 // Send frame to MUS via BitmapUploader.
178 uploader_->SetBitmap(bounds.width(), bounds.height(), std::move(data), 179 uploader_->SetBitmap(bounds.width(), bounds.height(), std::move(data),
179 ui::BitmapUploader::BGRA); 180 ui::BitmapUploader::BGRA);
180 } 181 }
181 182
182 } // namespace demo 183 } // namespace demo
183 } // namespace ui 184 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/demo/mus_demo.h ('k') | services/ui/public/cpp/tests/test_window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698