Sketch new SkyView interface to the engine

The SkyView interface will replace WebView as the interface to the SkyEngine.
The SkyView interface won't have a root level Document or Frame object but
instead will implement the base layers of the framework.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1135013006
This commit is contained in:
Adam Barth
2015-05-18 14:48:27 -07:00
parent b017dfd995
commit d78476524d
5 changed files with 112 additions and 1 deletions
+2 -1
View File
@@ -69,7 +69,8 @@ config("non_test_config") {
group("engine") {
deps = [
"//sky/engine/web",
"//sky/engine/platform",
"//sky/engine/public/sky",
"//sky/engine/web",
]
}
+23
View File
@@ -0,0 +1,23 @@
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_set("sky") {
deps = [
"//skia",
"//sky/engine/core",
"//sky/engine/platform",
]
configs += [
"//sky/engine:config",
"//sky/engine:inside_blink",
"//sky/engine:non_test_config",
]
sources = [
"sky_display_metrics.h",
"sky_view.cc",
"sky_view.h",
]
}
+19
View File
@@ -0,0 +1,19 @@
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_ENGINE_PUBLIC_SKY_SKY_DISPLAY_METRICS_H_
#define SKY_ENGINE_PUBLIC_SKY_SKY_DISPLAY_METRICS_H_
#include "sky/engine/public/platform/WebSize.h"
namespace blink {
struct SkyDisplayMetrics {
WebSize size;
float device_pixel_ratio;
};
} // namespace blink
#endif // SKY_ENGINE_PUBLIC_SKY_SKY_DISPLAY_METRICS_H_
+34
View File
@@ -0,0 +1,34 @@
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#include "sky/engine/public/sky/sky_view.h"
namespace blink {
std::unique_ptr<SkyView> SkyView::Create() {
return std::unique_ptr<SkyView>(new SkyView);
}
SkyView::SkyView() {
}
SkyView::~SkyView() {
}
void SkyView::SetDisplayMetrics(const SkyDisplayMetrics& metrics) {
}
void SkyView::Load(const WebURL& url) {
}
skia::RefPtr<SkPicture> SkyView::Paint() {
return skia::RefPtr<SkPicture>();
}
bool SkyView::HandleInputEvent(const WebInputEvent& event) {
return false;
}
} // namespace blink
+34
View File
@@ -0,0 +1,34 @@
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_ENGINE_PUBLIC_SKY_SKY_VIEW_H_
#define SKY_ENGINE_PUBLIC_SKY_SKY_VIEW_H_
#include <memory>
#include "skia/ext/refptr.h"
#include "sky/engine/public/platform/WebCommon.h"
#include "sky/engine/public/platform/WebURL.h"
#include "sky/engine/public/sky/sky_display_metrics.h"
#include "third_party/skia/include/core/SkPicture.h"
namespace blink {
class WebInputEvent;
class SkyView {
public:
static std::unique_ptr<SkyView> Create();
~SkyView();
void SetDisplayMetrics(const SkyDisplayMetrics& metrics);
void Load(const WebURL& url);
skia::RefPtr<SkPicture> Paint();
bool HandleInputEvent(const WebInputEvent& event);
private:
SkyView();
};
} // namespace blink
#endif // SKY_ENGINE_PUBLIC_SKY_SKY_VIEW_H_