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

Side by Side Diff: sky/shell/platform_view.h

Issue 1139873004: Make android directory for Android-specific bits of SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « sky/shell/org/domokit/sky/shell/TracingController.java ('k') | sky/shell/platform_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SKY_SHELL_SKY_VIEW_H_
6 #define SKY_SHELL_SKY_VIEW_H_
7
8 #include "base/android/jni_weak_ref.h"
9 #include "base/android/scoped_java_ref.h"
10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h"
12 #include "base/single_thread_task_runner.h"
13 #include "sky/shell/ui_delegate.h"
14
15 struct ANativeWindow;
16
17 namespace sky {
18 namespace shell {
19
20 class PlatformView {
21 public:
22 struct Config {
23 base::WeakPtr<UIDelegate> ui_delegate;
24 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner;
25 };
26
27 static bool Register(JNIEnv* env);
28
29 explicit PlatformView(const Config& config);
30 ~PlatformView();
31
32 void ConnectToViewportObserver(
33 mojo::InterfaceRequest<ViewportObserver> request);
34
35 // Called from Java
36 void Detach(JNIEnv* env, jobject obj);
37 void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface);
38 void SurfaceDestroyed(JNIEnv* env, jobject obj);
39 void SurfaceSetSize(JNIEnv* env,
40 jobject obj,
41 jint width,
42 jint height,
43 jfloat density);
44
45 private:
46 void ReleaseWindow();
47
48 Config config_;
49 ANativeWindow* window_;
50
51 DISALLOW_COPY_AND_ASSIGN(PlatformView);
52 };
53
54 } // namespace shell
55 } // namespace sky
56
57 #endif // SKY_SHELL_SKY_VIEW_H_
OLDNEW
« no previous file with comments | « sky/shell/org/domokit/sky/shell/TracingController.java ('k') | sky/shell/platform_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698