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

Unified Diff: ash/host/ash_window_tree_host.cc

Issue 1676713002: ash/mash: Add a mus-client that sets up ash to provide the system ui for mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix-cros-build Created 4 years, 10 months 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/host/ash_window_tree_host.h ('k') | ash/host/ash_window_tree_host_platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/host/ash_window_tree_host.cc
diff --git a/ash/host/ash_window_tree_host.cc b/ash/host/ash_window_tree_host.cc
index 5cbe067e6ec2fd13b38c13a3f361afaabfbebeeb..0bc59558f36effcf81d2c04348067faf9a6147e0 100644
--- a/ash/host/ash_window_tree_host.cc
+++ b/ash/host/ash_window_tree_host.cc
@@ -21,6 +21,12 @@
namespace ash {
+namespace {
+
+AshWindowTreeHost::Factory creation_factory;
+
+} // namespace
+
AshWindowTreeHost::AshWindowTreeHost() : input_method_handler_(nullptr) {
}
@@ -49,8 +55,12 @@ void AshWindowTreeHost::TranslateLocatedEvent(ui::LocatedEvent* event) {
}
}
+// static
AshWindowTreeHost* AshWindowTreeHost::Create(
const AshWindowTreeHostInitParams& init_params) {
+ if (!creation_factory.is_null())
+ return creation_factory.Run(init_params);
+
if (init_params.offscreen)
return new AshWindowTreeHostUnified(init_params.initial_bounds);
#if defined(USE_OZONE)
@@ -64,4 +74,9 @@ AshWindowTreeHost* AshWindowTreeHost::Create(
#endif
}
+// static
+void AshWindowTreeHost::SetFactory(const Factory& factory) {
+ creation_factory = factory;
+}
+
} // namespace ash
« no previous file with comments | « ash/host/ash_window_tree_host.h ('k') | ash/host/ash_window_tree_host_platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698