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

Side by Side Diff: components/mus/demo/mus_demo.cc

Issue 1949823002: WIP: Eliminate event.target() usage from TrayEventFilter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: container delegate Created 4 years, 7 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 "components/mus/demo/mus_demo.h" 5 #include "components/mus/demo/mus_demo.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "components/bitmap_uploader/bitmap_uploader.h" 8 #include "components/bitmap_uploader/bitmap_uploader.h"
9 #include "components/mus/public/cpp/window_tree_host_factory.h" 9 #include "components/mus/public/cpp/window_tree_host_factory.h"
10 #include "third_party/skia/include/core/SkCanvas.h" 10 #include "third_party/skia/include/core/SkCanvas.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kFrameDelay), 83 timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kFrameDelay),
84 base::Bind(&MusDemo::DrawFrame, base::Unretained(this))); 84 base::Bind(&MusDemo::DrawFrame, base::Unretained(this)));
85 } 85 }
86 86
87 void MusDemo::OnUnembed(mus::Window* root) {} 87 void MusDemo::OnUnembed(mus::Window* root) {}
88 88
89 void MusDemo::OnConnectionLost(mus::WindowTreeConnection* connection) { 89 void MusDemo::OnConnectionLost(mus::WindowTreeConnection* connection) {
90 timer_.Stop(); 90 timer_.Stop();
91 } 91 }
92 92
93 void MusDemo::OnEventObserved(const ui::Event& event) {} 93 void MusDemo::OnEventObserved(const ui::Event& event, mus::Window* target) {}
94 94
95 void MusDemo::SetWindowManagerClient(mus::WindowManagerClient* client) {} 95 void MusDemo::SetWindowManagerClient(mus::WindowManagerClient* client) {}
96 96
97 bool MusDemo::OnWmSetBounds(mus::Window* window, gfx::Rect* bounds) { 97 bool MusDemo::OnWmSetBounds(mus::Window* window, gfx::Rect* bounds) {
98 return true; 98 return true;
99 } 99 }
100 100
101 bool MusDemo::OnWmSetProperty(mus::Window* window, 101 bool MusDemo::OnWmSetProperty(mus::Window* window,
102 const std::string& name, 102 const std::string& name,
103 std::unique_ptr<std::vector<uint8_t>>* new_data) { 103 std::unique_ptr<std::vector<uint8_t>>* new_data) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 std::unique_ptr<std::vector<unsigned char>> data( 152 std::unique_ptr<std::vector<unsigned char>> data(
153 new std::vector<unsigned char>(addr, addr + bytes)); 153 new std::vector<unsigned char>(addr, addr + bytes));
154 bitmap_.unlockPixels(); 154 bitmap_.unlockPixels();
155 155
156 // Send frame to MUS via BitmapUploader. 156 // Send frame to MUS via BitmapUploader.
157 uploader_->SetBitmap(bounds.width(), bounds.height(), std::move(data), 157 uploader_->SetBitmap(bounds.width(), bounds.height(), std::move(data),
158 bitmap_uploader::BitmapUploader::BGRA); 158 bitmap_uploader::BitmapUploader::BGRA);
159 } 159 }
160 160
161 } // namespace mus_demo 161 } // namespace mus_demo
OLDNEW
« no previous file with comments | « components/mus/demo/mus_demo.h ('k') | components/mus/public/cpp/lib/window_tree_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698