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

Unified Diff: sky/shell/platform_view.h

Issue 1169983005: sky/shell updates for Android and iOS (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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: sky/shell/platform_view.h
diff --git a/sky/shell/android/platform_view.h b/sky/shell/platform_view.h
similarity index 50%
rename from sky/shell/android/platform_view.h
rename to sky/shell/platform_view.h
index 31466b86ee41fb778addbb27fbb3fd98b5f2aea1..59239b90d401c726d87626e2ac456e67b3d9d51f 100644
--- a/sky/shell/android/platform_view.h
+++ b/sky/shell/platform_view.h
@@ -2,18 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SKY_SHELL_SKY_VIEW_H_
-#define SKY_SHELL_SKY_VIEW_H_
+#ifndef SKY_SHELL_PLATFORM_VIEW_H_
+#define SKY_SHELL_PLATFORM_VIEW_H_
-#include "base/android/jni_weak_ref.h"
-#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
-#include "base/single_thread_task_runner.h"
#include "sky/shell/ui_delegate.h"
-struct ANativeWindow;
-
namespace sky {
namespace shell {
@@ -24,34 +19,24 @@ class PlatformView {
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner;
};
- static bool Register(JNIEnv* env);
-
explicit PlatformView(const Config& config);
- ~PlatformView();
+ virtual ~PlatformView();
void ConnectToViewportObserver(
mojo::InterfaceRequest<ViewportObserver> request);
- // Called from Java
- void Detach(JNIEnv* env, jobject obj);
- void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface);
- void SurfaceDestroyed(JNIEnv* env, jobject obj);
- void SurfaceSetSize(JNIEnv* env,
- jobject obj,
- jint width,
- jint height,
- jfloat density);
-
- private:
- void ReleaseWindow();
+ protected:
+ void SurfaceWasCreated();
+ void SurfaceWasDestroyed();
Config config_;
- ANativeWindow* window_;
+ gfx::AcceleratedWidget window_;
+ private:
DISALLOW_COPY_AND_ASSIGN(PlatformView);
};
} // namespace shell
} // namespace sky
-#endif // SKY_SHELL_SKY_VIEW_H_
+#endif // SKY_SHELL_PLATFORM_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698