Commit 34bae22e authored by sadrul's avatar sadrul Committed by Commit bot

views/mus: WindowTreeHostMus doesn't need to know about SurfaceType.

NativeWidgetMus sets up the context-factory for the WindowTreeHostMus,
and so WindowTreeHostMus doesn't need to know about the surface-type.

BUG=none

Review URL: https://codereview.chromium.org/1647483002

Cr-Commit-Position: refs/heads/master@{#371873}
parent 7ba4d54d
...@@ -307,8 +307,7 @@ void NativeWidgetMus::InitNativeWidget(const Widget::InitParams& params) { ...@@ -307,8 +307,7 @@ void NativeWidgetMus::InitNativeWidget(const Widget::InitParams& params) {
} }
aura::Env::GetInstance()->set_context_factory(context_factory_.get()); aura::Env::GetInstance()->set_context_factory(context_factory_.get());
} }
window_tree_host_.reset( window_tree_host_.reset(new WindowTreeHostMus(shell_, this, window_));
new WindowTreeHostMus(shell_, this, window_, surface_type_));
window_tree_host_->AddObserver(this); window_tree_host_->AddObserver(this);
window_tree_host_->InitHost(); window_tree_host_->InitHost();
aura::Env::GetInstance()->set_context_factory(default_context_factory); aura::Env::GetInstance()->set_context_factory(default_context_factory);
......
...@@ -18,8 +18,7 @@ namespace views { ...@@ -18,8 +18,7 @@ namespace views {
WindowTreeHostMus::WindowTreeHostMus(mojo::Shell* shell, WindowTreeHostMus::WindowTreeHostMus(mojo::Shell* shell,
NativeWidgetMus* native_widget, NativeWidgetMus* native_widget,
mus::Window* window, mus::Window* window)
mus::mojom::SurfaceType surface_type)
: native_widget_(native_widget), : native_widget_(native_widget),
show_state_(ui::PLATFORM_WINDOW_STATE_UNKNOWN) { show_state_(ui::PLATFORM_WINDOW_STATE_UNKNOWN) {
SetPlatformWindow( SetPlatformWindow(
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#define UI_VIEWS_MUS_WINDOW_TREE_HOST_MUS_H_ #define UI_VIEWS_MUS_WINDOW_TREE_HOST_MUS_H_
#include "base/macros.h" #include "base/macros.h"
#include "components/mus/public/interfaces/window_tree.mojom.h"
#include "ui/aura/window_tree_host_platform.h" #include "ui/aura/window_tree_host_platform.h"
#include "ui/views/mus/mus_export.h" #include "ui/views/mus/mus_export.h"
...@@ -30,8 +29,7 @@ class VIEWS_MUS_EXPORT WindowTreeHostMus : public aura::WindowTreeHostPlatform { ...@@ -30,8 +29,7 @@ class VIEWS_MUS_EXPORT WindowTreeHostMus : public aura::WindowTreeHostPlatform {
public: public:
WindowTreeHostMus(mojo::Shell* shell, WindowTreeHostMus(mojo::Shell* shell,
NativeWidgetMus* native_widget_, NativeWidgetMus* native_widget_,
mus::Window* window, mus::Window* window);
mus::mojom::SurfaceType surface_type);
~WindowTreeHostMus() override; ~WindowTreeHostMus() override;
PlatformWindowMus* platform_window(); PlatformWindowMus* platform_window();
......
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