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

Unified Diff: ui/ozone/platform/test/ozone_platform_test.cc

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Introduce OzoneClient Created 5 years, 7 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: ui/ozone/platform/test/ozone_platform_test.cc
diff --git a/ui/ozone/platform/test/ozone_platform_test.cc b/ui/ozone/platform/test/ozone_platform_test.cc
index d94fde97707f0cdd31e5db7ac966355656f59a52..77ff3ca5f7476a37869730d1ed0b03b13f556edc 100644
--- a/ui/ozone/platform/test/ozone_platform_test.cc
+++ b/ui/ozone/platform/test/ozone_platform_test.cc
@@ -17,8 +17,10 @@
#include "ui/ozone/public/gpu_platform_support.h"
#include "ui/ozone/public/gpu_platform_support_host.h"
#include "ui/ozone/public/input_controller.h"
+#include "ui/ozone/public/ozone_client.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/ozone_switches.h"
+#include "ui/ozone/public/surface_client_factory_ozone.h"
#include "ui/ozone/public/system_input_injector.h"
namespace ui {
@@ -103,6 +105,32 @@ class OzonePlatformTest : public OzonePlatform {
DISALLOW_COPY_AND_ASSIGN(OzonePlatformTest);
};
+class OzoneClientTest : public OzoneClient {
+ public:
+ OzoneClientTest() {}
+ ~OzoneClientTest() override {}
+
+ // OzoneClient:
+ SurfaceClientFactoryOzone* GetSurfaceClientFactoryOzone() override {
+ return surface_client_.get();
+ }
+
+ void InitializeUI() override {
+ if (!surface_client_)
+ surface_client_.reset(new SurfaceClientFactoryOzone);
+ }
+
+ void InitializeRenderer() override {
+ if (!surface_client_)
+ surface_client_.reset(new SurfaceClientFactoryOzone);
+ }
+
+ private:
+ scoped_ptr<SurfaceClientFactoryOzone> surface_client_;
+
+ DISALLOW_COPY_AND_ASSIGN(OzoneClientTest);
+};
+
} // namespace
OzonePlatform* CreateOzonePlatformTest() {
@@ -113,4 +141,8 @@ OzonePlatform* CreateOzonePlatformTest() {
return new OzonePlatformTest(location);
}
+OzoneClient* CreateOzoneClientTest() {
+ return new OzoneClientTest;
+}
+
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698