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

Unified Diff: ui/compositor/test/test_compositor_host_win.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 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 | « ui/compositor/test/test_compositor_host_ozone.cc ('k') | ui/compositor/test/test_compositor_host_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/test_compositor_host_win.cc
diff --git a/ui/compositor/test/test_compositor_host_win.cc b/ui/compositor/test/test_compositor_host_win.cc
deleted file mode 100644
index 99a5a85e1b764279740e70275cf40419154089c3..0000000000000000000000000000000000000000
--- a/ui/compositor/test/test_compositor_host_win.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2012 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 "ui/compositor/test/test_compositor_host.h"
-
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/thread_task_runner_handle.h"
-#include "ui/compositor/compositor.h"
-#include "ui/gfx/win/window_impl.h"
-
-namespace ui {
-
-class TestCompositorHostWin : public TestCompositorHost,
- public gfx::WindowImpl {
- public:
- TestCompositorHostWin(const gfx::Rect& bounds,
- ui::ContextFactory* context_factory) {
- Init(NULL, bounds);
- compositor_.reset(new ui::Compositor(hwnd(),
- context_factory,
- base::ThreadTaskRunnerHandle::Get()));
- compositor_->SetScaleAndSize(1.0f, GetSize());
- }
-
- virtual ~TestCompositorHostWin() {
- DestroyWindow(hwnd());
- }
-
- // Overridden from TestCompositorHost:
- virtual void Show() override {
- ShowWindow(hwnd(), SW_SHOWNORMAL);
- }
- virtual ui::Compositor* GetCompositor() override {
- return compositor_.get();
- }
-
- private:
- CR_BEGIN_MSG_MAP_EX(TestCompositorHostWin)
- CR_MSG_WM_PAINT(OnPaint)
- CR_END_MSG_MAP()
-
- void OnPaint(HDC dc) {
- compositor_->Draw();
- ValidateRect(hwnd(), NULL);
- }
-
- gfx::Size GetSize() {
- RECT r;
- GetClientRect(hwnd(), &r);
- return gfx::Rect(r).size();
- }
-
- scoped_ptr<ui::Compositor> compositor_;
-
- DISALLOW_COPY_AND_ASSIGN(TestCompositorHostWin);
-};
-
-TestCompositorHost* TestCompositorHost::Create(
- const gfx::Rect& bounds,
- ui::ContextFactory* context_factory) {
- return new TestCompositorHostWin(bounds, context_factory);
-}
-
-} // namespace ui
« no previous file with comments | « ui/compositor/test/test_compositor_host_ozone.cc ('k') | ui/compositor/test/test_compositor_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698