Chromium Code Reviews| Index: ui/aura/mus/window_tree_host_mus.h |
| diff --git a/ui/aura/mus/window_tree_host_mus.h b/ui/aura/mus/window_tree_host_mus.h |
| index 186fd30ae9a8aa11a6c1b605a45fe718c3a83572..0869b600515119919a03cd3ab95b4529775dea7b 100644 |
| --- a/ui/aura/mus/window_tree_host_mus.h |
| +++ b/ui/aura/mus/window_tree_host_mus.h |
| @@ -11,7 +11,6 @@ |
| #include "services/service_manager/public/cpp/connector.h" |
| #include "ui/aura/aura_export.h" |
| #include "ui/aura/window_tree_host_platform.h" |
| -#include "ui/gfx/geometry/vector2d.h" |
| class SkBitmap; |
| @@ -27,27 +26,15 @@ namespace aura { |
| class InputMethodMus; |
| class WindowPortMus; |
| +class WindowTreeClient; |
| class WindowTreeHostMusDelegate; |
| -enum class RootWindowType; |
| - |
| -// WindowTreeHostMus is configured in two distinct modes: |
| -// . with a content window. In this case the content window is added as a child |
| -// of the Window created by this class. Any changes to the size of the content |
| -// window is propagated to its parent. Additionally once the content window is |
| -// destroyed the WindowTreeHostMus is destroyed. |
| -// . without a content window. |
| -// |
| -// If a content window is supplied WindowTreeHostMus deletes itself when the |
| -// content window is destroyed. If no content window is supplied it is assumed |
| -// the WindowTreeHostMus is explicitly deleted. |
| class AURA_EXPORT WindowTreeHostMus : public aura::WindowTreeHostPlatform { |
| public: |
| WindowTreeHostMus(std::unique_ptr<WindowPortMus> window_port, |
| WindowTreeHostMusDelegate* delegate, |
| - RootWindowType root_window_type, |
| - int64_t display_id, |
| - Window* content_window = nullptr); |
| + int64_t display_id); |
| + explicit WindowTreeHostMus(WindowTreeClient* window_tree_client); |
|
sadrul
2016/11/02 16:03:04
Is this used only in tests?
sky
2016/11/02 16:53:23
It will be used in views. Specifically I'm working
|
| ~WindowTreeHostMus() override; |
| // Sets the bounds in dips. |
| @@ -57,56 +44,30 @@ class AURA_EXPORT WindowTreeHostMus : public aura::WindowTreeHostPlatform { |
| return aura::WindowTreeHostPlatform::SendEventToProcessor(event); |
| } |
| - Window* content_window() { return content_window_; } |
| - |
| InputMethodMus* input_method() { return input_method_.get(); } |
| - // Offset of the bounds from its parent. The Window (and content window if |
| - // present) always has an origin of 0x0 locally. This offset gives the offset |
| - // of the window in its parent. |
| - void set_origin_offset(const gfx::Vector2d& offset) { |
| - origin_offset_ = offset; |
| - } |
| - const gfx::Vector2d& origin_offset() const { return origin_offset_; } |
| - |
| - RootWindowType root_window_type() const { return root_window_type_; } |
| - |
| + // Intended only for WindowTreeClient to call. |
| void set_display_id(int64_t id) { display_id_ = id; } |
| + int64_t display_id() const { return display_id_; } |
| display::Display GetDisplay() const; |
| - private: |
| - class ContentWindowObserver; |
| - |
| - Window* GetWindowWithServerWindow(); |
| - |
| - // Called when various things happen to the content window. |
| - void ContentWindowDestroyed(); |
| - |
| // aura::WindowTreeHostPlatform: |
| void ShowImpl() override; |
| void HideImpl() override; |
| void SetBounds(const gfx::Rect& bounds) override; |
| - gfx::Rect GetBounds() const override; |
| - gfx::Point GetLocationOnNativeScreen() const override; |
| void DispatchEvent(ui::Event* event) override; |
| void OnClosed() override; |
| void OnActivationChanged(bool active) override; |
| void OnCloseRequest() override; |
| gfx::ICCProfile GetICCProfileForCurrentDisplay() override; |
| + private: |
| int64_t display_id_; |
| - const RootWindowType root_window_type_; |
| WindowTreeHostMusDelegate* delegate_; |
| bool in_set_bounds_from_server_ = false; |
| - gfx::Vector2d origin_offset_; |
| - |
| - // May be null, see class description. |
| - Window* content_window_; |
| - |
| - std::unique_ptr<ContentWindowObserver> content_window_observer_; |
| std::unique_ptr<InputMethodMus> input_method_; |
| DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMus); |