| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   57  |   57  | 
|   58   canvas->drawRect(rect, paint); |   58   canvas->drawRect(rect, paint); | 
|   59 } |   59 } | 
|   60  |   60  | 
|   61 }  // namespace |   61 }  // namespace | 
|   62  |   62  | 
|   63 MusDemo::MusDemo() {} |   63 MusDemo::MusDemo() {} | 
|   64  |   64  | 
|   65 MusDemo::~MusDemo() {} |   65 MusDemo::~MusDemo() {} | 
|   66  |   66  | 
|   67 void MusDemo::OnStart(service_manager::ServiceContext* context) { |   67 void MusDemo::OnStart() { | 
|   68   gpu_service_ = GpuService::Create(context->connector()); |   68   gpu_service_ = GpuService::Create(context()->connector()); | 
|   69   window_tree_client_ = base::MakeUnique<WindowTreeClient>(this, this); |   69   window_tree_client_ = base::MakeUnique<WindowTreeClient>(this, this); | 
|   70   window_tree_client_->ConnectAsWindowManager(context->connector()); |   70   window_tree_client_->ConnectAsWindowManager(context()->connector()); | 
|   71 } |   71 } | 
|   72  |   72  | 
|   73 bool MusDemo::OnConnect(const service_manager::ServiceInfo& remote_info, |   73 bool MusDemo::OnConnect(const service_manager::ServiceInfo& remote_info, | 
|   74                         service_manager::InterfaceRegistry* registry) { |   74                         service_manager::InterfaceRegistry* registry) { | 
|   75   return true; |   75   return true; | 
|   76 } |   76 } | 
|   77  |   77  | 
|   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(); | 
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  200   BitmapUploader::Format bitmap_format = BitmapUploader::BGRA; |  200   BitmapUploader::Format bitmap_format = BitmapUploader::BGRA; | 
|  201 #endif |  201 #endif | 
|  202  |  202  | 
|  203   // Send frame to MUS via BitmapUploader. |  203   // Send frame to MUS via BitmapUploader. | 
|  204   uploader_->SetBitmap(bounds.width(), bounds.height(), std::move(data), |  204   uploader_->SetBitmap(bounds.width(), bounds.height(), std::move(data), | 
|  205                        bitmap_format); |  205                        bitmap_format); | 
|  206 } |  206 } | 
|  207  |  207  | 
|  208 }  // namespace demo |  208 }  // namespace demo | 
|  209 }  // namespace ui |  209 }  // namespace ui | 
| OLD | NEW |