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

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 update 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 3b40be5dd0fd8e8cef9f02160a48c91f0e6e71d1..2ff584b31a1021b5924821ee81ea81ad003bf0bf 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
@@ -3217,8 +3216,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;
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounterTest.cpp ('k') | third_party/WebKit/public/platform/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698