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

Unified Diff: examples/surfaces_app/surfaces_app.cc

Issue 878933005: Remove NativeViewportClient (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
Index: examples/surfaces_app/surfaces_app.cc
diff --git a/examples/surfaces_app/surfaces_app.cc b/examples/surfaces_app/surfaces_app.cc
index af1d89dde2ebbc5b9c288c42f8874d9a89fa1e08..ae08a3712451a1956fdc83dc511b0c87961fb0a2 100644
--- a/examples/surfaces_app/surfaces_app.cc
+++ b/examples/surfaces_app/surfaces_app.cc
@@ -27,9 +27,7 @@ namespace examples {
static const uint32_t kLocalId = 1u;
-class SurfacesApp : public ApplicationDelegate,
- public SurfaceClient,
- public NativeViewportClient {
+class SurfacesApp : public ApplicationDelegate, public SurfaceClient {
public:
SurfacesApp() : id_namespace_(0u), weak_factory_(this) {}
~SurfacesApp() override {}
@@ -37,7 +35,6 @@ class SurfacesApp : public ApplicationDelegate,
// ApplicationDelegate implementation
bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
connection->ConnectToService("mojo:native_viewport_service", &viewport_);
- viewport_.set_client(this);
connection->ConnectToService("mojo:surfaces_service", &surface_);
surface_.set_client(this);
@@ -87,6 +84,7 @@ class SurfacesApp : public ApplicationDelegate,
base::TimeDelta::FromMilliseconds(50));
}
+ private:
// SurfaceClient implementation.
void SetIdNamespace(uint32_t id_namespace) override {
auto qualified_id = mojo::SurfaceId::New();
@@ -97,12 +95,8 @@ class SurfacesApp : public ApplicationDelegate,
void ReturnResources(Array<ReturnedResourcePtr> resources) override {
DCHECK(!resources.size());
}
- // NativeViewportClient implementation.
- void OnMetricsChanged(mojo::ViewportMetricsPtr metrics) override {}
- void OnDestroyed() override {}
-
- private:
- void OnCreatedNativeViewport(uint64_t native_viewport_id) {}
+ void OnCreatedNativeViewport(uint64_t native_viewport_id,
+ mojo::ViewportMetricsPtr metrics) {}
SurfacePtr surface_;
uint32_t id_namespace_;

Powered by Google App Engine
This is Rietveld 408576698