Commit 67a34aac authored by mfomitchev's avatar mfomitchev Committed by Commit bot

Getting rid of SurfaceIdHandler as it is no longer needed.

BUG=NONE

Review-Url: https://codereview.chromium.org/2610103003
Cr-Commit-Position: refs/heads/master@{#441948}
parent bcb0b710
......@@ -12,7 +12,6 @@ source_set("cpp") {
"property_type_converters.h",
"raster_thread_helper.h",
"scoped_window_ptr.h",
"surface_id_handler.h",
"window.h",
"window_compositor_frame_sink.h",
"window_manager_delegate.h",
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_
#define SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_
#include "cc/surfaces/surface_id.h"
#include "ui/gfx/geometry/size.h"
namespace cc {
class SurfaceInfo;
}
namespace ui {
class Window;
class SurfaceIdHandler {
public:
// Called when a child window allocates a new surface ID.
// If the handler wishes to retain ownership of the |surface_info|,
// it can move it. If a child's surface has been cleared then
// |surface_info| will refer to a null pointer.
virtual void OnChildWindowSurfaceChanged(
Window* window,
const cc::SurfaceInfo& surface_info) = 0;
};
} // namespace ui
#endif // SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_
......@@ -14,7 +14,6 @@
#include "base/macros.h"
#include "services/ui/common/transient_window_utils.h"
#include "services/ui/public/cpp/property_type_converters.h"
#include "services/ui/public/cpp/surface_id_handler.h"
#include "services/ui/public/cpp/window_compositor_frame_sink.h"
#include "services/ui/public/cpp/window_observer.h"
#include "services/ui/public/cpp/window_private.h"
......@@ -597,7 +596,6 @@ Window::Window(WindowTreeClient* client, Id id)
// Matches aura, see aura::Window for details.
observers_(base::ObserverList<WindowObserver>::NOTIFY_EXISTING_ONLY),
input_event_handler_(nullptr),
surface_id_handler_(nullptr),
visible_(false),
opacity_(1.0f),
display_id_(display::kInvalidDisplayId),
......@@ -818,10 +816,6 @@ void Window::LocalSetSurfaceInfo(const cc::SurfaceInfo& surface_info) {
// TODO(kylechar): Start return reference here?
}
}
if (parent_ && parent_->surface_id_handler_) {
parent_->surface_id_handler_->OnChildWindowSurfaceChanged(this,
surface_info);
}
surface_info_ = surface_info;
}
......
......@@ -15,7 +15,6 @@
#include "mojo/public/cpp/bindings/array.h"
#include "services/service_manager/public/interfaces/interface_provider.mojom.h"
#include "services/ui/common/types.h"
#include "services/ui/public/cpp/surface_id_handler.h"
#include "services/ui/public/cpp/window_compositor_frame_sink.h"
#include "services/ui/public/interfaces/mus_constants.mojom.h"
#include "services/ui/public/interfaces/window_tree.mojom.h"
......@@ -29,7 +28,6 @@ class GpuMemoryBufferManager;
namespace ui {
class InputEventHandler;
class SurfaceIdHandler;
class WindowCompositorFrameSinkBinding;
class WindowObserver;
class WindowDropTarget;
......@@ -169,10 +167,6 @@ class Window {
input_event_handler_ = input_event_handler;
}
void set_surface_id_handler(SurfaceIdHandler* surface_id_handler) {
surface_id_handler_ = surface_id_handler;
}
// Observation.
void AddObserver(WindowObserver* observer);
void RemoveObserver(WindowObserver* observer);
......@@ -368,7 +362,6 @@ class Window {
base::ObserverList<WindowObserver> observers_;
InputEventHandler* input_event_handler_;
SurfaceIdHandler* surface_id_handler_;
gfx::Rect bounds_;
gfx::Insets client_area_;
......
......@@ -11,7 +11,6 @@
#include "base/macros.h"
#include "mojo/public/cpp/bindings/array.h"
#include "services/ui/public/cpp/surface_id_handler.h"
#include "services/ui/public/cpp/window.h"
namespace ui {
......
......@@ -18,7 +18,6 @@
#include "services/ui/common/util.h"
#include "services/ui/public/cpp/in_flight_change.h"
#include "services/ui/public/cpp/input_event_handler.h"
#include "services/ui/public/cpp/surface_id_handler.h"
#include "services/ui/public/cpp/window_drop_target.h"
#include "services/ui/public/cpp/window_manager_delegate.h"
#include "services/ui/public/cpp/window_observer.h"
......
......@@ -94,7 +94,6 @@ component("aura") {
"mus/property_converter.h",
"mus/property_utils.cc",
"mus/property_utils.h",
"mus/surface_id_handler.h",
"mus/text_input_client_impl.cc",
"mus/text_input_client_impl.h",
"mus/window_compositor_frame_sink.cc",
......
......@@ -5,7 +5,6 @@
#include "ui/aura/mus/client_surface_embedder.h"
#include "cc/surfaces/surface_reference_factory.h"
#include "ui/aura/mus/surface_id_handler.h"
#include "ui/aura/window.h"
namespace aura {
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_AURA_MUS_SURFACE_ID_HANDLER_H_
#define UI_AURA_MUS_SURFACE_ID_HANDLER_H_
#include "cc/surfaces/surface_id.h"
#include "ui/gfx/geometry/size.h"
namespace cc {
class SurfaceInfo;
}
namespace aura {
class Window;
class SurfaceIdHandler {
public:
// Called when a child window allocates a new surface ID.
// If the handler wishes to retain ownership of the |surface_info|,
// it can move it. If a child's surface has been cleared then
// |surface_info| will refer to a null pointer.
virtual void OnChildWindowSurfaceChanged(
Window* window,
const cc::SurfaceInfo& surface_info) = 0;
};
} // namespace aura
#endif // UI_AURA_MUS_SURFACE_ID_HANDLER_H_
......@@ -9,7 +9,6 @@
#include "ui/aura/client/transient_window_client.h"
#include "ui/aura/mus/client_surface_embedder.h"
#include "ui/aura/mus/property_converter.h"
#include "ui/aura/mus/surface_id_handler.h"
#include "ui/aura/mus/window_tree_client.h"
#include "ui/aura/mus/window_tree_client_delegate.h"
#include "ui/aura/window.h"
......@@ -255,12 +254,6 @@ void WindowPortMus::SetSurfaceInfoFromServer(
// TODO(kylechar): Start return reference here?
}
}
WindowPortMus* parent = Get(window_->parent());
// TODO(mfomitchev): This is unused. We probably don't need this.
if (parent && parent->surface_id_handler_) {
parent->surface_id_handler_->OnChildWindowSurfaceChanged(window_,
surface_info);
}
// The fact that SetSurfaceIdFromServer was called means that this window
// corresponds to an embedded client.
......
......@@ -28,7 +28,6 @@ namespace aura {
class ClientSurfaceEmbedder;
class PropertyConverter;
class SurfaceIdHandler;
class Window;
class WindowPortMusTestApi;
class WindowTreeClient;
......@@ -73,10 +72,6 @@ class AURA_EXPORT WindowPortMus : public WindowPort, public WindowMus {
std::unique_ptr<WindowCompositorFrameSinkBinding>
compositor_frame_sink_binding);
void set_surface_id_handler(SurfaceIdHandler* surface_id_handler) {
surface_id_handler_ = surface_id_handler;
}
private:
friend class WindowPortMusTestApi;
friend class WindowTreeClient;
......@@ -250,7 +245,6 @@ class AURA_EXPORT WindowPortMus : public WindowPort, public WindowMus {
ServerChangeIdType next_server_change_id_ = 0;
ServerChanges server_changes_;
SurfaceIdHandler* surface_id_handler_ = nullptr;
cc::SurfaceInfo surface_info_;
ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL;
......
......@@ -30,7 +30,6 @@
#include "ui/aura/mus/input_method_mus.h"
#include "ui/aura/mus/property_converter.h"
#include "ui/aura/mus/property_utils.h"
#include "ui/aura/mus/surface_id_handler.h"
#include "ui/aura/mus/window_manager_delegate.h"
#include "ui/aura/mus/window_mus.h"
#include "ui/aura/mus/window_port_mus.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment