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

Unified Diff: chrome/test/base/view_event_test_platform_part_default.cc

Issue 2645253002: DesktopAura: Track windows "owned" via the DesktopWindowTreeHost (Closed)
Patch Set: simpler 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
Index: chrome/test/base/view_event_test_platform_part_default.cc
diff --git a/chrome/test/base/view_event_test_platform_part_default.cc b/chrome/test/base/view_event_test_platform_part_default.cc
deleted file mode 100644
index 8d32515c4239b70af98b4a94ae3ea1a6080bec0f..0000000000000000000000000000000000000000
--- a/chrome/test/base/view_event_test_platform_part_default.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <memory>
-
-#include "base/macros.h"
-#include "chrome/test/base/view_event_test_platform_part.h"
-#include "ui/aura/env.h"
-#include "ui/display/screen.h"
-#include "ui/views/widget/desktop_aura/desktop_screen.h"
-
-#if !defined(OS_CHROMEOS) && defined(OS_LINUX)
-#include "ui/views/test/test_desktop_screen_x11.h"
-#endif
-
-namespace {
-
-// ViewEventTestPlatformPart implementation for Views, but non-CrOS.
-class ViewEventTestPlatformPartDefault : public ViewEventTestPlatformPart {
- public:
- ViewEventTestPlatformPartDefault(
- ui::ContextFactory* context_factory,
- ui::ContextFactoryPrivate* context_factory_private) {
-#if defined(USE_AURA)
- DCHECK(!display::Screen::GetScreen());
-#if defined(USE_X11) && !defined(OS_CHROMEOS)
- display::Screen::SetScreenInstance(
- views::test::TestDesktopScreenX11::GetInstance());
-#else
- screen_.reset(views::CreateDesktopScreen());
- display::Screen::SetScreenInstance(screen_.get());
-#endif
- env_ = aura::Env::CreateInstance();
- env_->set_context_factory(context_factory);
- env_->set_context_factory_private(context_factory_private);
-#endif
- }
-
- ~ViewEventTestPlatformPartDefault() override {
-#if defined(USE_AURA)
- env_.reset();
- display::Screen::SetScreenInstance(nullptr);
-#endif
- }
-
- // Overridden from ViewEventTestPlatformPart:
- gfx::NativeWindow GetContext() override { return NULL; }
-
- private:
- std::unique_ptr<display::Screen> screen_;
- std::unique_ptr<aura::Env> env_;
-
- DISALLOW_COPY_AND_ASSIGN(ViewEventTestPlatformPartDefault);
-};
-
-} // namespace
-
-// static
-ViewEventTestPlatformPart* ViewEventTestPlatformPart::Create(
- ui::ContextFactory* context_factory,
- ui::ContextFactoryPrivate* context_factory_private) {
- return new ViewEventTestPlatformPartDefault(context_factory,
- context_factory_private);
-}

Powered by Google App Engine
This is Rietveld 408576698