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

Side by Side Diff: ui/views/mus/mus_client.h

Issue 2488393003: Changes views_aura_mus_unittests to create DesktopNativeWidgetAura (Closed)
Patch Set: git add 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
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 #ifndef UI_VIEWS_MUS_MUS_CLIENT_INIT_H_ 5 #ifndef UI_VIEWS_MUS_MUS_CLIENT_INIT_H_
6 #define UI_VIEWS_MUS_MUS_CLIENT_INIT_H_ 6 #define UI_VIEWS_MUS_MUS_CLIENT_INIT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // AuraInit::Mode::AURA to AuraInit and MusClient will be created for us. 55 // AuraInit::Mode::AURA to AuraInit and MusClient will be created for us.
56 class VIEWS_MUS_EXPORT MusClient 56 class VIEWS_MUS_EXPORT MusClient
57 : public aura::WindowTreeClientDelegate, 57 : public aura::WindowTreeClientDelegate,
58 public ScreenMusDelegate, 58 public ScreenMusDelegate,
59 public ui::OSExchangeDataProviderFactory::Factory { 59 public ui::OSExchangeDataProviderFactory::Factory {
60 public: 60 public:
61 ~MusClient() override; 61 ~MusClient() override;
62 62
63 static MusClient* Get() { return instance_; } 63 static MusClient* Get() { return instance_; }
64 64
65 // Returns true if a DesktopNativeWidgetAura should be created given the
66 // specified params.
msw 2016/11/11 00:29:24 nit: "Otherwise, the appropriate type to use is Na
sky 2016/11/11 01:09:13 That's right. Updated.
67 static bool ShouldCreateDesktopNativeWidgetAura(
68 const Widget::InitParams& init_params);
69
65 service_manager::Connector* connector() { return connector_; } 70 service_manager::Connector* connector() { return connector_; }
66 71
67 aura::WindowTreeClient* window_tree_client() { 72 aura::WindowTreeClient* window_tree_client() {
68 return window_tree_client_.get(); 73 return window_tree_client_.get();
69 } 74 }
70 75
71 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is 76 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is
72 // set as the factory function used for creating NativeWidgets when a 77 // set as the factory function used for creating NativeWidgets when a
73 // NativeWidget has not been explicitly set. 78 // NativeWidget has not been explicitly set.
74 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, 79 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 std::unique_ptr<aura::GpuService> gpu_service_; 122 std::unique_ptr<aura::GpuService> gpu_service_;
118 123
119 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; 124 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_;
120 125
121 DISALLOW_COPY_AND_ASSIGN(MusClient); 126 DISALLOW_COPY_AND_ASSIGN(MusClient);
122 }; 127 };
123 128
124 } // namespace views 129 } // namespace views
125 130
126 #endif // UI_VIEWS_MUS_MUS_CLIENT_INIT_H_ 131 #endif // UI_VIEWS_MUS_MUS_CLIENT_INIT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698