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

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

Issue 936883002: Connect Sky and Ganesh in SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address review comments Created 5 years, 10 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/library_loader.cc ('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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SKY_SHELL_SKY_VIEW_H_ 5 #ifndef SKY_SHELL_SKY_VIEW_H_
6 #define SKY_SHELL_SKY_VIEW_H_ 6 #define SKY_SHELL_SKY_VIEW_H_
7 7
8 #include "base/android/jni_weak_ref.h" 8 #include "base/android/jni_weak_ref.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "sky/shell/gpu_delegate.h" 13 #include "sky/shell/gpu_delegate.h"
14 #include "sky/shell/ui_delegate.h" 14 #include "sky/shell/ui_delegate.h"
15 15
16 struct ANativeWindow; 16 struct ANativeWindow;
17 17
18 namespace sky { 18 namespace sky {
19 namespace shell { 19 namespace shell {
20 20
21 class SkyView { 21 class PlatformView {
22 public: 22 public:
23 struct Config { 23 struct Config {
24 base::WeakPtr<GPUDelegate> gpu_delegate; 24 base::WeakPtr<GPUDelegate> gpu_delegate;
25 scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner; 25 scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner;
26 26
27 base::WeakPtr<UIDelegate> ui_delegate; 27 base::WeakPtr<UIDelegate> ui_delegate;
28 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner; 28 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner;
29 }; 29 };
30 30
31 static bool Register(JNIEnv* env); 31 static bool Register(JNIEnv* env);
32 32
33 explicit SkyView(const Config& config); 33 explicit PlatformView(const Config& config);
34 ~SkyView(); 34 ~PlatformView();
35 35
36 // Called from Java 36 // Called from Java
37 void Destroy(JNIEnv* env, jobject obj); 37 void Detach(JNIEnv* env, jobject obj);
38 void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); 38 void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface);
39 void SurfaceDestroyed(JNIEnv* env, jobject obj); 39 void SurfaceDestroyed(JNIEnv* env, jobject obj);
40 void SurfaceSetSize(JNIEnv* env, 40 void SurfaceSetSize(JNIEnv* env,
41 jobject obj, 41 jobject obj,
42 jint width, 42 jint width,
43 jint height, 43 jint height,
44 jfloat density); 44 jfloat density);
45 45
46 private: 46 private:
47 void ReleaseWindow(); 47 void ReleaseWindow();
48 48
49 Config config_; 49 Config config_;
50 ANativeWindow* window_; 50 ANativeWindow* window_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(SkyView); 52 DISALLOW_COPY_AND_ASSIGN(PlatformView);
53 }; 53 };
54 54
55 } // namespace shell 55 } // namespace shell
56 } // namespace sky 56 } // namespace sky
57 57
58 #endif // SKY_SHELL_SKY_VIEW_H_ 58 #endif // SKY_SHELL_SKY_VIEW_H_
OLDNEW
« no previous file with comments | « sky/shell/library_loader.cc ('k') | sky/shell/platform_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698