Index: sky/shell/ui/engine.h |
diff --git a/sky/shell/ui/engine.h b/sky/shell/ui/engine.h |
index 9deccd8c6b8b4e2ddb0da4f8f3ebd062b65eacb9..c8a380f6c152fff7918b036751b79060b0073991 100644 |
--- a/sky/shell/ui/engine.h |
+++ b/sky/shell/ui/engine.h |
@@ -8,32 +8,54 @@ |
#include "base/macros.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
+#include "base/single_thread_task_runner.h" |
+#include "mojo/public/cpp/system/core.h" |
+#include "skia/ext/refptr.h" |
#include "sky/engine/public/web/WebFrameClient.h" |
#include "sky/engine/public/web/WebViewClient.h" |
+#include "sky/shell/gpu_delegate.h" |
#include "sky/shell/ui_delegate.h" |
+#include "third_party/skia/include/core/SkPicture.h" |
#include "ui/gfx/geometry/size.h" |
namespace sky { |
namespace shell { |
+class Animator; |
class PlatformImpl; |
class Engine : public UIDelegate, |
public blink::WebFrameClient, |
public blink::WebViewClient { |
public: |
- Engine(); |
+ struct Config { |
+ base::WeakPtr<GPUDelegate> gpu_delegate; |
+ scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner; |
+ }; |
+ |
+ explicit Engine(const Config& config); |
~Engine() override; |
base::WeakPtr<Engine> GetWeakPtr(); |
- void Init(); |
+ void Init(mojo::ScopedMessagePipeHandle service_provider); |
- void OnViewportMetricsChanged(const gfx::Size& size, |
- float device_pixel_ratio) override; |
+ void BeginFrame(base::TimeTicks frame_time); |
+ skia::RefPtr<SkPicture> Paint(); |
private: |
+ // UIDelegate methods: |
+ void OnViewportMetricsChanged(const gfx::Size& physical_size, |
+ float device_pixel_ratio) override; |
+ |
+ // WebViewClient methods: |
+ void initializeLayerTreeView() override; |
+ void scheduleVisualUpdate() override; |
+ |
+ Config config_; |
scoped_ptr<PlatformImpl> platform_impl_; |
+ scoped_ptr<Animator> animator_; |
blink::WebView* web_view_; |
+ gfx::Size physical_size_; |
base::WeakPtrFactory<Engine> weak_factory_; |