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

Unified Diff: ash/mus/frame/detached_title_area_renderer.cc

Issue 2539363005: Converts ash to use aura-mus (Closed)
Patch Set: add overrides Created 4 years 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 | « ash/mus/frame/detached_title_area_renderer.h ('k') | ash/mus/layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/frame/detached_title_area_renderer.cc
diff --git a/ash/mus/frame/detached_title_area_renderer.cc b/ash/mus/frame/detached_title_area_renderer.cc
index 3eeabee7205896acb1775ba73d869c83d4aa7b8c..68aebbb8f6ad8e01fff2d4ccde9c26834190683a 100644
--- a/ash/mus/frame/detached_title_area_renderer.cc
+++ b/ash/mus/frame/detached_title_area_renderer.cc
@@ -5,10 +5,11 @@
#include "ash/mus/frame/detached_title_area_renderer.h"
#include "ash/common/frame/header_view.h"
+#include "ash/mus/bridge/wm_window_mus.h"
#include "ash/mus/frame/detached_title_area_renderer_host.h"
-#include "services/ui/public/cpp/window.h"
-#include "ui/views/mus/native_widget_mus.h"
+#include "ui/aura/window.h"
#include "ui/views/view.h"
+#include "ui/views/widget/native_widget_aura.h"
#include "ui/views/widget/widget.h"
namespace ash {
@@ -17,16 +18,23 @@ namespace mus {
DetachedTitleAreaRenderer::DetachedTitleAreaRenderer(
DetachedTitleAreaRendererHost* host,
views::Widget* frame,
- ui::Window* window,
+ const gfx::Rect& bounds,
Source source)
: host_(host), frame_(frame), widget_(new views::Widget) {
views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
params.delegate = this;
params.name = "DetachedTitleAreaRenderer";
params.activatable = views::Widget::InitParams::ACTIVATABLE_NO;
- params.native_widget = new views::NativeWidgetMus(
- widget_, window, ui::mojom::CompositorFrameSinkType::UNDERLAY);
+ views::NativeWidgetAura* native_widget =
+ new views::NativeWidgetAura(widget_, true);
+ params.native_widget = native_widget;
+ // TODO: making the reveal window a sibling is likely problematic.
+ // http://crbug.com/640392, see also comment in GetVisibleBoundsInScreen().
+ params.parent = frame->GetNativeView()->parent();
+ params.bounds = bounds;
widget_->Init(params);
+ params.parent->StackChildAbove(widget_->GetNativeView(),
+ frame->GetNativeView());
HeaderView* header_view = new HeaderView(frame_);
if (source == Source::CLIENT) {
// HeaderView behaves differently when the widget it is associated with is
@@ -36,7 +44,7 @@ DetachedTitleAreaRenderer::DetachedTitleAreaRenderer(
header_view->set_is_immersive_delegate(false);
}
widget_->SetContentsView(header_view);
- widget_->GetRootView()->SetSize(window->bounds().size());
+ widget_->GetRootView()->SetSize(bounds.size());
widget_->ShowInactive();
}
« no previous file with comments | « ash/mus/frame/detached_title_area_renderer.h ('k') | ash/mus/layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698