| Index: sky/shell/ui/engine.h
|
| diff --git a/sky/shell/ui/engine.h b/sky/shell/ui/engine.h
|
| index 9deccd8c6b8b4e2ddb0da4f8f3ebd062b65eacb9..ec21ab4e88347c6a3633069b863b8c2a0c27bd91 100644
|
| --- a/sky/shell/ui/engine.h
|
| +++ b/sky/shell/ui/engine.h
|
| @@ -8,32 +8,53 @@
|
| #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;
|
| +
|
| scoped_ptr<PlatformImpl> platform_impl_;
|
| + scoped_ptr<Animator> animator_;
|
| blink::WebView* web_view_;
|
| + gfx::Size physical_size_;
|
|
|
| base::WeakPtrFactory<Engine> weak_factory_;
|
|
|
|
|