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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2894063002: Expose UseCounter::Feature enum out of blink as WebFeature (Closed)
Patch Set: Rebase Created 3 years, 7 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: third_party/WebKit/Source/core/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index 74b38a460e8554b99ce89bff02e1e8b2cbff684a..209fa4df19430b4c9dbc339d6df3b51a08acd257 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -164,14 +164,13 @@ class UseCounterObserverImpl final : public UseCounter::Observer {
WTF_MAKE_NONCOPYABLE(UseCounterObserverImpl);
public:
- UseCounterObserverImpl(ScriptPromiseResolver* resolver,
- UseCounter::Feature feature)
+ UseCounterObserverImpl(ScriptPromiseResolver* resolver, WebFeature feature)
: resolver_(resolver), feature_(feature) {}
- bool OnCountFeature(UseCounter::Feature feature) final {
+ bool OnCountFeature(WebFeature feature) final {
if (feature_ != feature)
return false;
- resolver_->Resolve(feature);
+ resolver_->Resolve(static_cast<int>(feature));
return true;
}
@@ -182,7 +181,7 @@ class UseCounterObserverImpl final : public UseCounter::Observer {
private:
Member<ScriptPromiseResolver> resolver_;
- UseCounter::Feature feature_;
+ WebFeature feature_;
};
} // namespace
@@ -3220,8 +3219,8 @@ ScriptPromise Internals::observeUseCounter(ScriptState* script_state,
return promise;
}
- page->GetUseCounter().AddObserver(
- new UseCounterObserverImpl(resolver, use_counter_feature));
+ page->GetUseCounter().AddObserver(new UseCounterObserverImpl(
+ resolver, static_cast<WebFeature>(use_counter_feature)));
return promise;
}

Powered by Google App Engine
This is Rietveld 408576698