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

Unified Diff: cc/blink/web_layer_impl.cc

Issue 1419913002: Remove blink::WebLayerClient and WebGraphicsLayerDebugInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: try making webcore_shared link with base to fix win dbg component Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: cc/blink/web_layer_impl.cc
diff --git a/cc/blink/web_layer_impl.cc b/cc/blink/web_layer_impl.cc
index b372408555996341e58d159004ff1aa765cdac73..f6a7624ab6f633443679275f072e6ff2a96c6cff 100644
--- a/cc/blink/web_layer_impl.cc
+++ b/cc/blink/web_layer_impl.cc
@@ -24,8 +24,6 @@
#include "cc/trees/layer_tree_host.h"
#include "third_party/WebKit/public/platform/WebFloatPoint.h"
#include "third_party/WebKit/public/platform/WebFloatRect.h"
-#include "third_party/WebKit/public/platform/WebGraphicsLayerDebugInfo.h"
-#include "third_party/WebKit/public/platform/WebLayerClient.h"
#include "third_party/WebKit/public/platform/WebLayerPositionConstraint.h"
#include "third_party/WebKit/public/platform/WebLayerScrollClient.h"
#include "third_party/WebKit/public/platform/WebSize.h"
@@ -53,20 +51,15 @@ base::LazyInstance<cc::LayerSettings> g_layer_settings =
WebLayerImpl::WebLayerImpl()
: layer_(Layer::Create(LayerSettings())), contents_opaque_is_fixed_(false) {
- web_layer_client_ = nullptr;
- layer_->SetLayerClient(this);
}
WebLayerImpl::WebLayerImpl(scoped_refptr<Layer> layer)
: layer_(layer), contents_opaque_is_fixed_(false) {
- web_layer_client_ = nullptr;
- layer_->SetLayerClient(this);
}
WebLayerImpl::~WebLayerImpl() {
if (animation_delegate_adapter_.get())
layer_->set_layer_animation_delegate(nullptr);
- web_layer_client_ = nullptr;
layer_->SetLayerClient(nullptr);
}
@@ -488,39 +481,12 @@ bool WebLayerImpl::isOrphan() const {
return !layer_->layer_tree_host();
}
-void WebLayerImpl::setWebLayerClient(blink::WebLayerClient* client) {
- web_layer_client_ = client;
+void WebLayerImpl::setLayerClient(cc::LayerClient* client) {
+ layer_->SetLayerClient(client);
}
-class TracedDebugInfo : public base::trace_event::ConvertableToTraceFormat {
- public:
- // This object takes ownership of the debug_info object.
- explicit TracedDebugInfo(blink::WebGraphicsLayerDebugInfo* debug_info)
- : debug_info_(debug_info) {}
- void AppendAsTraceFormat(std::string* out) const override {
- DCHECK(thread_checker_.CalledOnValidThread());
- blink::WebString web_string;
- debug_info_->appendAsTraceFormat(&web_string);
- out->append(web_string.utf8());
- }
-
- private:
- ~TracedDebugInfo() override {}
- scoped_ptr<blink::WebGraphicsLayerDebugInfo> debug_info_;
- base::ThreadChecker thread_checker_;
-};
-
-scoped_refptr<base::trace_event::ConvertableToTraceFormat>
-WebLayerImpl::TakeDebugInfo() {
- if (!web_layer_client_)
- return nullptr;
- blink::WebGraphicsLayerDebugInfo* debug_info =
- web_layer_client_->takeDebugInfoFor(this);
-
- if (debug_info)
- return new TracedDebugInfo(debug_info);
- else
- return nullptr;
+const cc::Layer* WebLayerImpl::ccLayer() const {
danakj 2015/10/23 17:53:39 part of me wonders if this should return void* to
jbroman 2015/10/23 17:58:59 If people (including the whole of you) would like
danakj 2015/10/23 18:01:04 It'll just be weird if the WebLayer API still exis
+ return layer_.get();
}
void WebLayerImpl::setScrollParent(blink::WebLayer* parent) {

Powered by Google App Engine
This is Rietveld 408576698