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

Unified Diff: ui/ozone/platform/headless/headless_surface_factory.cc

Issue 1410123003: Rename "test" ozone platform to "headless" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final fix Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/headless/headless_surface_factory.h ('k') | ui/ozone/platform/headless/headless_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/headless/headless_surface_factory.cc
diff --git a/ui/ozone/platform/test/test_surface_factory.cc b/ui/ozone/platform/headless/headless_surface_factory.cc
similarity index 77%
rename from ui/ozone/platform/test/test_surface_factory.cc
rename to ui/ozone/platform/headless/headless_surface_factory.cc
index b51344163c6c90971f65dcf82df00330312d5ab5..3262e69370accc7cbea6e0e29807b1b1027d02c5 100644
--- a/ui/ozone/platform/test/test_surface_factory.cc
+++ b/ui/ozone/platform/headless/headless_surface_factory.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/ozone/platform/test/test_surface_factory.h"
+#include "ui/ozone/platform/headless/headless_surface_factory.h"
#include "base/bind.h"
#include "base/files/file_util.h"
@@ -14,8 +14,8 @@
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/skia_util.h"
#include "ui/gfx/vsync_provider.h"
-#include "ui/ozone/platform/test/test_window.h"
-#include "ui/ozone/platform/test/test_window_manager.h"
+#include "ui/ozone/platform/headless/headless_window.h"
+#include "ui/ozone/platform/headless/headless_window_manager.h"
#include "ui/ozone/public/surface_ozone_canvas.h"
namespace ui {
@@ -31,6 +31,7 @@ void WriteDataToFile(const base::FilePath& location, const SkBitmap& bitmap) {
png_data.size());
}
+// TODO(altimin): Find a proper way to capture rendering output.
class FileSurface : public SurfaceOzoneCanvas {
public:
FileSurface(const base::FilePath& location) : location_(location) {}
@@ -66,20 +67,22 @@ class FileSurface : public SurfaceOzoneCanvas {
} // namespace
-TestSurfaceFactory::TestSurfaceFactory() : TestSurfaceFactory(nullptr) {}
+HeadlessSurfaceFactory::HeadlessSurfaceFactory()
+ : HeadlessSurfaceFactory(nullptr) {}
-TestSurfaceFactory::TestSurfaceFactory(TestWindowManager* window_manager)
+HeadlessSurfaceFactory::HeadlessSurfaceFactory(
+ HeadlessWindowManager* window_manager)
: window_manager_(window_manager) {}
-TestSurfaceFactory::~TestSurfaceFactory() {}
+HeadlessSurfaceFactory::~HeadlessSurfaceFactory() {}
-scoped_ptr<SurfaceOzoneCanvas> TestSurfaceFactory::CreateCanvasForWidget(
+scoped_ptr<SurfaceOzoneCanvas> HeadlessSurfaceFactory::CreateCanvasForWidget(
gfx::AcceleratedWidget widget) {
- TestWindow* window = window_manager_->GetWindow(widget);
+ HeadlessWindow* window = window_manager_->GetWindow(widget);
return make_scoped_ptr<SurfaceOzoneCanvas>(new FileSurface(window->path()));
}
-bool TestSurfaceFactory::LoadEGLGLES2Bindings(
+bool HeadlessSurfaceFactory::LoadEGLGLES2Bindings(
AddGLLibraryCallback add_gl_library,
SetGLGetProcAddressProcCallback set_gl_get_proc_address) {
return false;
« no previous file with comments | « ui/ozone/platform/headless/headless_surface_factory.h ('k') | ui/ozone/platform/headless/headless_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698