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

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

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: . 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/input_devices/input_device_server.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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 MusDemo::~MusDemo() { 63 MusDemo::~MusDemo() {
64 delete window_tree_client_; 64 delete window_tree_client_;
65 } 65 }
66 66
67 void MusDemo::OnStart(const shell::Identity& identity) { 67 void MusDemo::OnStart(const shell::Identity& identity) {
68 gpu_service_ = GpuService::Initialize(connector()); 68 gpu_service_ = GpuService::Initialize(connector());
69 window_tree_client_ = new WindowTreeClient(this, this, nullptr); 69 window_tree_client_ = new WindowTreeClient(this, this, nullptr);
70 window_tree_client_->ConnectAsWindowManager(connector()); 70 window_tree_client_->ConnectAsWindowManager(connector());
71 } 71 }
72 72
73 bool MusDemo::OnConnect(shell::Connection* connection) { 73 bool MusDemo::OnConnect(const shell::Identity& remote_identity,
74 shell::InterfaceRegistry* registry) {
74 return true; 75 return true;
75 } 76 }
76 77
77 void MusDemo::OnEmbed(Window* window) { 78 void MusDemo::OnEmbed(Window* window) {
78 // Not called for the WindowManager. 79 // Not called for the WindowManager.
79 NOTREACHED(); 80 NOTREACHED();
80 } 81 }
81 82
82 void MusDemo::OnDidDestroyClient(WindowTreeClient* client) { 83 void MusDemo::OnDidDestroyClient(WindowTreeClient* client) {
83 window_tree_client_ = nullptr; 84 window_tree_client_ = nullptr;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « services/ui/demo/mus_demo.h ('k') | services/ui/input_devices/input_device_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698