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

Side by Side Diff: ash/mus/frame/detached_title_area_renderer.cc

Issue 2429173005: Mus+Ash: Replace (Server)WindowSurface with (Server)WindowCompositorFrameSink (Closed)
Patch Set: Rebased Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « ash/mus/bridge/wm_root_window_controller_mus.cc ('k') | ash/mus/native_widget_factory_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/mus/frame/detached_title_area_renderer.h" 5 #include "ash/mus/frame/detached_title_area_renderer.h"
6 6
7 #include "ash/common/frame/header_view.h" 7 #include "ash/common/frame/header_view.h"
8 #include "ash/mus/frame/detached_title_area_renderer_host.h" 8 #include "ash/mus/frame/detached_title_area_renderer_host.h"
9 #include "services/ui/public/cpp/window.h" 9 #include "services/ui/public/cpp/window.h"
10 #include "ui/views/mus/native_widget_mus.h" 10 #include "ui/views/mus/native_widget_mus.h"
11 #include "ui/views/view.h" 11 #include "ui/views/view.h"
12 #include "ui/views/widget/widget.h" 12 #include "ui/views/widget/widget.h"
13 13
14 namespace ash { 14 namespace ash {
15 namespace mus { 15 namespace mus {
16 16
17 DetachedTitleAreaRenderer::DetachedTitleAreaRenderer( 17 DetachedTitleAreaRenderer::DetachedTitleAreaRenderer(
18 DetachedTitleAreaRendererHost* host, 18 DetachedTitleAreaRendererHost* host,
19 views::Widget* frame, 19 views::Widget* frame,
20 ui::Window* window, 20 ui::Window* window,
21 Source source) 21 Source source)
22 : host_(host), frame_(frame), widget_(new views::Widget) { 22 : host_(host), frame_(frame), widget_(new views::Widget) {
23 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); 23 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
24 params.delegate = this; 24 params.delegate = this;
25 params.name = "DetachedTitleAreaRenderer"; 25 params.name = "DetachedTitleAreaRenderer";
26 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; 26 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO;
27 params.native_widget = new views::NativeWidgetMus( 27 params.native_widget = new views::NativeWidgetMus(
28 widget_, window, ui::mojom::SurfaceType::UNDERLAY); 28 widget_, window, ui::mojom::CompositorFrameSinkType::UNDERLAY);
29 widget_->Init(params); 29 widget_->Init(params);
30 HeaderView* header_view = new HeaderView(frame_); 30 HeaderView* header_view = new HeaderView(frame_);
31 if (source == Source::CLIENT) { 31 if (source == Source::CLIENT) {
32 // HeaderView behaves differently when the widget it is associated with is 32 // HeaderView behaves differently when the widget it is associated with is
33 // fullscreen (HeaderView is normally the 33 // fullscreen (HeaderView is normally the
34 // ImmersiveFullscreenControllerDelegate). Set this as when creating for 34 // ImmersiveFullscreenControllerDelegate). Set this as when creating for
35 // the client HeaderView is not the ImmersiveFullscreenControllerDelegate. 35 // the client HeaderView is not the ImmersiveFullscreenControllerDelegate.
36 header_view->set_is_immersive_delegate(false); 36 header_view->set_is_immersive_delegate(false);
37 } 37 }
38 widget_->SetContentsView(header_view); 38 widget_->SetContentsView(header_view);
(...skipping 18 matching lines...) Expand all
57 void DetachedTitleAreaRenderer::DeleteDelegate() { 57 void DetachedTitleAreaRenderer::DeleteDelegate() {
58 if (host_) 58 if (host_)
59 host_->OnDetachedTitleAreaRendererDestroyed(this); 59 host_->OnDetachedTitleAreaRendererDestroyed(this);
60 delete this; 60 delete this;
61 } 61 }
62 62
63 DetachedTitleAreaRenderer::~DetachedTitleAreaRenderer() {} 63 DetachedTitleAreaRenderer::~DetachedTitleAreaRenderer() {}
64 64
65 } // namespace mus 65 } // namespace mus
66 } // namespace ash 66 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_root_window_controller_mus.cc ('k') | ash/mus/native_widget_factory_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698