Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1697)

Unified Diff: ui/views/mus/window_manager_connection.cc

Issue 1676713002: ash/mash: Add a mus-client that sets up ash to provide the system ui for mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix-cros-build Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/mus/window_manager_connection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/window_manager_connection.cc
diff --git a/ui/views/mus/window_manager_connection.cc b/ui/views/mus/window_manager_connection.cc
index 9a0e5cfbdb75100b6ffe016e088ba109d3d487ce..4d1c3098374d19faf06f09b18d282db5ae2a7339 100644
--- a/ui/views/mus/window_manager_connection.cc
+++ b/ui/views/mus/window_manager_connection.cc
@@ -54,6 +54,15 @@ mus::Window* WindowManagerConnection::NewWindow(
return window_tree_connection_->NewTopLevelWindow(&properties);
}
+NativeWidget* WindowManagerConnection::CreateNativeWidgetMus(
+ const Widget::InitParams& init_params,
+ internal::NativeWidgetDelegate* delegate) {
+ std::map<std::string, std::vector<uint8_t>> properties;
+ NativeWidgetMus::ConfigurePropertiesForNewWindow(init_params, &properties);
+ return new NativeWidgetMus(delegate, shell_, NewWindow(properties),
+ mus::mojom::SurfaceType::DEFAULT);
+}
+
WindowManagerConnection::WindowManagerConnection(mojo::Shell* shell)
: shell_(shell), window_tree_connection_(nullptr) {
window_tree_connection_.reset(
@@ -62,9 +71,8 @@ WindowManagerConnection::WindowManagerConnection(mojo::Shell* shell)
screen_.reset(new ScreenMus(this));
screen_->Init(shell);
- ViewsDelegate::GetInstance()->set_native_widget_factory(
- base::Bind(&WindowManagerConnection::CreateNativeWidget,
- base::Unretained(this)));
+ ViewsDelegate::GetInstance()->set_native_widget_factory(base::Bind(
+ &WindowManagerConnection::CreateNativeWidgetMus, base::Unretained(this)));
}
WindowManagerConnection::~WindowManagerConnection() {
@@ -83,13 +91,4 @@ void WindowManagerConnection::OnWindowManagerFrameValuesChanged() {
NativeWidgetMus::NotifyFrameChanged(window_tree_connection_.get());
}
-NativeWidget* WindowManagerConnection::CreateNativeWidget(
- const Widget::InitParams& init_params,
- internal::NativeWidgetDelegate* delegate) {
- std::map<std::string, std::vector<uint8_t>> properties;
- NativeWidgetMus::ConfigurePropertiesForNewWindow(init_params, &properties);
- return new NativeWidgetMus(delegate, shell_, NewWindow(properties),
- mus::mojom::SurfaceType::DEFAULT);
-}
-
} // namespace views
« no previous file with comments | « ui/views/mus/window_manager_connection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698