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

Unified Diff: mash/wm/non_client_frame_controller.cc

Issue 1994763002: Wires up WorkspaceLayoutManager in mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: data deps Created 4 years, 7 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 | « mash/wm/non_client_frame_controller.h ('k') | mash/wm/property_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/non_client_frame_controller.cc
diff --git a/mash/wm/non_client_frame_controller.cc b/mash/wm/non_client_frame_controller.cc
index 3d5b3fe1f269d690744161e40dea0322a0e77ade..083b2e06bdefeaa91a57146c6570729834ce2e61 100644
--- a/mash/wm/non_client_frame_controller.cc
+++ b/mash/wm/non_client_frame_controller.cc
@@ -17,6 +17,7 @@
#include "components/mus/public/cpp/window_property.h"
#include "components/mus/public/interfaces/window_manager.mojom.h"
#include "components/mus/public/interfaces/window_tree_host.mojom.h"
+#include "mash/wm/bridge/wm_window_mus.h"
#include "mash/wm/frame/frame_border_hit_test_controller.h"
#include "mash/wm/frame/move_event_handler.h"
#include "mash/wm/frame/non_client_frame_view_mash.h"
@@ -187,9 +188,11 @@ class ClientViewMus : public views::ClientView {
// static
void NonClientFrameController::Create(
shell::Connector* connector,
+ mus::Window* parent,
mus::Window* window,
mus::WindowManagerClient* window_manager_client) {
- new NonClientFrameController(connector, window, window_manager_client);
+ new NonClientFrameController(connector, parent, window,
+ window_manager_client);
}
// static
@@ -204,9 +207,11 @@ int NonClientFrameController::GetMaxTitleBarButtonWidth() {
NonClientFrameController::NonClientFrameController(
shell::Connector* connector,
+ mus::Window* parent,
mus::Window* window,
mus::WindowManagerClient* window_manager_client)
: widget_(new views::Widget), window_(window) {
+ WmWindowMus::Get(window)->set_widget(widget_);
window_->AddObserver(this);
// To simplify things this code creates a Widget. While a Widget is created
@@ -220,6 +225,9 @@ NonClientFrameController::NonClientFrameController(
params.native_widget =
new WmNativeWidgetMus(widget_, connector, window, window_manager_client);
widget_->Init(params);
+
+ parent->AddChild(window);
+
widget_->ShowInactive();
const int shadow_inset =
« no previous file with comments | « mash/wm/non_client_frame_controller.h ('k') | mash/wm/property_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698