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

Unified Diff: ash/host/ash_window_tree_host.cc

Issue 2611253002: Removes some dead code (Closed)
Patch Set: merge Created 3 years, 11 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_win.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 73ecd8cc6ead963f989a76bc4713973afedc73bf..939f097d35648af36c2c33d1b4c972f8e1cb175b 100644
--- a/ash/host/ash_window_tree_host.cc
+++ b/ash/host/ash_window_tree_host.cc
@@ -6,7 +6,6 @@
#include "ash/host/ash_window_tree_host_init_params.h"
#include "ash/host/ash_window_tree_host_unified.h"
-#include "base/lazy_instance.h"
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/window_tree_host.h"
#include "ui/events/event.h"
@@ -16,19 +15,10 @@
#include "ash/host/ash_window_tree_host_platform.h"
#elif defined(USE_X11)
#include "ash/host/ash_window_tree_host_x11.h"
-#elif defined(OS_WIN)
-#include "ash/host/ash_window_tree_host_win.h"
#endif
namespace ash {
-namespace {
-
-base::LazyInstance<AshWindowTreeHost::Factory> creation_factory =
- LAZY_INSTANCE_INITIALIZER;
-
-} // namespace
-
AshWindowTreeHost::AshWindowTreeHost() : input_method_handler_(nullptr) {}
void AshWindowTreeHost::TranslateLocatedEvent(ui::LocatedEvent* event) {
@@ -59,25 +49,15 @@ void AshWindowTreeHost::TranslateLocatedEvent(ui::LocatedEvent* event) {
// static
AshWindowTreeHost* AshWindowTreeHost::Create(
const AshWindowTreeHostInitParams& init_params) {
- if (!creation_factory.Get().is_null())
- return creation_factory.Get().Run(init_params);
-
if (init_params.offscreen)
return new AshWindowTreeHostUnified(init_params.initial_bounds);
#if defined(USE_OZONE)
return new AshWindowTreeHostPlatform(init_params.initial_bounds);
#elif defined(USE_X11)
return new AshWindowTreeHostX11(init_params.initial_bounds);
-#elif defined(OS_WIN)
- return new AshWindowTreeHostWin(init_params.initial_bounds);
#else
#error Unsupported platform.
#endif
}
-// static
-void AshWindowTreeHost::SetFactory(const Factory& factory) {
- creation_factory.Get() = factory;
-}
-
} // namespace ash
« no previous file with comments | « ash/host/ash_window_tree_host.h ('k') | ash/host/ash_window_tree_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698