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

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

Issue 2488393003: Changes views_aura_mus_unittests to create DesktopNativeWidgetAura (Closed)
Patch Set: remove this and fix mac 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 | « ui/views/focus/focus_manager_unittest.cc ('k') | ui/views/mus/mus_client.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 #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. If this returns false a NativeWidgetAura should be
67 // created.
68 static bool ShouldCreateDesktopNativeWidgetAura(
69 const Widget::InitParams& init_params);
70
65 service_manager::Connector* connector() { return connector_; } 71 service_manager::Connector* connector() { return connector_; }
66 72
67 aura::WindowTreeClient* window_tree_client() { 73 aura::WindowTreeClient* window_tree_client() {
68 return window_tree_client_.get(); 74 return window_tree_client_.get();
69 } 75 }
70 76
71 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is 77 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is
72 // set as the factory function used for creating NativeWidgets when a 78 // set as the factory function used for creating NativeWidgets when a
73 // NativeWidget has not been explicitly set. 79 // NativeWidget has not been explicitly set.
74 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, 80 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_; 123 std::unique_ptr<aura::GpuService> gpu_service_;
118 124
119 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; 125 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_;
120 126
121 DISALLOW_COPY_AND_ASSIGN(MusClient); 127 DISALLOW_COPY_AND_ASSIGN(MusClient);
122 }; 128 };
123 129
124 } // namespace views 130 } // namespace views
125 131
126 #endif // UI_VIEWS_MUS_MUS_CLIENT_INIT_H_ 132 #endif // UI_VIEWS_MUS_MUS_CLIENT_INIT_H_
OLDNEW
« no previous file with comments | « ui/views/focus/focus_manager_unittest.cc ('k') | ui/views/mus/mus_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698