| Index: services/ui/demo/mus_demo.cc
|
| diff --git a/services/ui/demo/mus_demo.cc b/services/ui/demo/mus_demo.cc
|
| index b8ed5641f7e4f07d125a6706038a98c9719fe0ba..04bc37b693525abd0aec432c1d128d8d2da8f989 100644
|
| --- a/services/ui/demo/mus_demo.cc
|
| +++ b/services/ui/demo/mus_demo.cc
|
| @@ -7,7 +7,6 @@
|
| #include "base/memory/ptr_util.h"
|
| #include "base/time/time.h"
|
| #include "services/service_manager/public/cpp/connector.h"
|
| -#include "services/service_manager/public/cpp/service_context.h"
|
| #include "services/ui/public/cpp/gpu/gpu.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| #include "third_party/skia/include/core/SkCanvas.h"
|
| @@ -34,9 +33,6 @@ namespace {
|
| // Milliseconds between frames.
|
| const int64_t kFrameDelay = 33;
|
|
|
| -// Size of square in pixels to draw.
|
| -const int kSquareSize = 300;
|
| -
|
| const SkColor kBgColor = SK_ColorRED;
|
| const SkColor kFgColor = SK_ColorYELLOW;
|
|
|
| @@ -149,9 +145,7 @@ void MusDemo::OnStart() {
|
| property_converter_ = base::MakeUnique<aura::PropertyConverter>();
|
| wm_state_ = base::MakeUnique<::wm::WMState>();
|
|
|
| - window_tree_client_ = base::MakeUnique<aura::WindowTreeClient>(
|
| - context()->connector(), this, this);
|
| - window_tree_client_->ConnectAsWindowManager();
|
| + OnStartImpl();
|
|
|
| env_->SetWindowTreeClient(window_tree_client_.get());
|
| }
|
| @@ -163,7 +157,6 @@ bool MusDemo::OnConnect(const service_manager::ServiceInfo& remote_info,
|
|
|
| void MusDemo::OnEmbed(
|
| std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) {
|
| - // Not called for the WindowManager.
|
| NOTREACHED();
|
| }
|
|
|
| @@ -172,7 +165,6 @@ void MusDemo::OnUnembed(aura::Window* root) {
|
| }
|
|
|
| void MusDemo::OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) {
|
| - // Not called for the WindowManager.
|
| NOTREACHED();
|
| }
|
|
|
| @@ -188,73 +180,5 @@ aura::PropertyConverter* MusDemo::GetPropertyConverter() {
|
| return property_converter_.get();
|
| }
|
|
|
| -void MusDemo::SetWindowManagerClient(aura::WindowManagerClient* client) {}
|
| -
|
| -bool MusDemo::OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) {
|
| - return true;
|
| -}
|
| -
|
| -bool MusDemo::OnWmSetProperty(aura::Window* window,
|
| - const std::string& name,
|
| - std::unique_ptr<std::vector<uint8_t>>* new_data) {
|
| - return true;
|
| -}
|
| -
|
| -void MusDemo::OnWmSetCanFocus(aura::Window* window, bool can_focus) {}
|
| -
|
| -aura::Window* MusDemo::OnWmCreateTopLevelWindow(
|
| - mojom::WindowType window_type,
|
| - std::map<std::string, std::vector<uint8_t>>* properties) {
|
| - NOTREACHED();
|
| - return nullptr;
|
| -}
|
| -
|
| -void MusDemo::OnWmClientJankinessChanged(
|
| - const std::set<aura::Window*>& client_windows,
|
| - bool janky) {
|
| - // Don't care
|
| -}
|
| -
|
| -void MusDemo::OnWmWillCreateDisplay(const display::Display& display) {
|
| - screen_->display_list().AddDisplay(display,
|
| - display::DisplayList::Type::PRIMARY);
|
| -}
|
| -
|
| -void MusDemo::OnWmNewDisplay(
|
| - std::unique_ptr<aura::WindowTreeHostMus> window_tree_host,
|
| - const display::Display& display) {
|
| - DCHECK(!window_tree_data_); // Only support one display.
|
| - window_tree_data_ = base::MakeUnique<WindowTreeData>(
|
| - std::move(window_tree_host), kSquareSize);
|
| -}
|
| -
|
| -void MusDemo::OnWmDisplayRemoved(aura::WindowTreeHostMus* window_tree_host) {
|
| - window_tree_data_.reset();
|
| -}
|
| -
|
| -void MusDemo::OnWmDisplayModified(const display::Display& display) {}
|
| -
|
| -mojom::EventResult MusDemo::OnAccelerator(uint32_t id, const Event& event) {
|
| - return mojom::EventResult::UNHANDLED;
|
| -}
|
| -
|
| -void MusDemo::OnWmPerformMoveLoop(aura::Window* window,
|
| - mojom::MoveLoopSource source,
|
| - const gfx::Point& cursor_location,
|
| - const base::Callback<void(bool)>& on_done) {
|
| - // Don't care
|
| -}
|
| -
|
| -void MusDemo::OnWmCancelMoveLoop(aura::Window* window) {}
|
| -
|
| -void MusDemo::OnWmSetClientArea(
|
| - aura::Window* window,
|
| - const gfx::Insets& insets,
|
| - const std::vector<gfx::Rect>& additional_client_areas) {}
|
| -
|
| -bool MusDemo::IsWindowActive(aura::Window* window) { return false; }
|
| -
|
| -void MusDemo::OnWmDeactivateWindow(aura::Window* window) {}
|
| -
|
| } // namespace demo
|
| } // namespace aura
|
|
|