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

Side by Side Diff: ui/views/test/native_widget_factory_aura_mus.cc

Issue 2514243002: Propagates window type properties during aura-mus window creation (Closed)
Patch Set: merge 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 unified diff | Download patch
« no previous file with comments | « ui/views/mus/mus_client.cc ('k') | no next file » | 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 "ui/views/test/native_widget_factory.h" 5 #include "ui/views/test/native_widget_factory.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "ui/views/mus/desktop_window_tree_host_mus.h" 8 #include "ui/views/mus/desktop_window_tree_host_mus.h"
9 #include "ui/views/mus/mus_client.h" 9 #include "ui/views/mus/mus_client.h"
10 #include "ui/views/test/test_platform_native_widget.h" 10 #include "ui/views/test/test_platform_native_widget.h"
(...skipping 10 matching lines...) Expand all
21 Widget* widget, 21 Widget* widget,
22 int32_t type, 22 int32_t type,
23 bool* destroyed) { 23 bool* destroyed) {
24 if (!create_desktop_native_widget_aura) { 24 if (!create_desktop_native_widget_aura) {
25 return new TestPlatformNativeWidget<NativeWidgetAura>( 25 return new TestPlatformNativeWidget<NativeWidgetAura>(
26 widget, type == kStubCapture, destroyed); 26 widget, type == kStubCapture, destroyed);
27 } 27 }
28 DesktopNativeWidgetAura* desktop_native_widget_aura = 28 DesktopNativeWidgetAura* desktop_native_widget_aura =
29 new TestPlatformNativeWidget<DesktopNativeWidgetAura>( 29 new TestPlatformNativeWidget<DesktopNativeWidgetAura>(
30 widget, type == kStubCapture, destroyed); 30 widget, type == kStubCapture, destroyed);
31 std::map<std::string, std::vector<uint8_t>> mus_properties =
32 MusClient::ConfigurePropertiesFromParams(init_params);
31 desktop_native_widget_aura->SetDesktopWindowTreeHost( 33 desktop_native_widget_aura->SetDesktopWindowTreeHost(
32 base::MakeUnique<DesktopWindowTreeHostMus>( 34 base::MakeUnique<DesktopWindowTreeHostMus>(
33 widget, desktop_native_widget_aura, init_params)); 35 widget, desktop_native_widget_aura, &mus_properties));
34 return desktop_native_widget_aura; 36 return desktop_native_widget_aura;
35 } 37 }
36 38
37 } // namespace 39 } // namespace
38 40
39 NativeWidget* CreatePlatformNativeWidgetImpl( 41 NativeWidget* CreatePlatformNativeWidgetImpl(
40 const Widget::InitParams& init_params, 42 const Widget::InitParams& init_params,
41 Widget* widget, 43 Widget* widget,
42 uint32_t type, 44 uint32_t type,
43 bool* destroyed) { 45 bool* destroyed) {
44 // Only create a NativeWidgetAura if necessary, otherwise use 46 // Only create a NativeWidgetAura if necessary, otherwise use
45 // DesktopNativeWidgetAura. 47 // DesktopNativeWidgetAura.
46 return CreatePlatformNativeWidgetImplAuraMus( 48 return CreatePlatformNativeWidgetImplAuraMus(
47 MusClient::ShouldCreateDesktopNativeWidgetAura(init_params), init_params, 49 MusClient::ShouldCreateDesktopNativeWidgetAura(init_params), init_params,
48 widget, type, destroyed); 50 widget, type, destroyed);
49 } 51 }
50 52
51 NativeWidget* CreatePlatformDesktopNativeWidgetImpl( 53 NativeWidget* CreatePlatformDesktopNativeWidgetImpl(
52 const Widget::InitParams& init_params, 54 const Widget::InitParams& init_params,
53 Widget* widget, 55 Widget* widget,
54 bool* destroyed) { 56 bool* destroyed) {
55 return CreatePlatformNativeWidgetImplAuraMus(true, init_params, widget, 57 return CreatePlatformNativeWidgetImplAuraMus(true, init_params, widget,
56 kDefault, destroyed); 58 kDefault, destroyed);
57 } 59 }
58 60
59 } // namespace test 61 } // namespace test
60 } // namespace views 62 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/mus_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698