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

Unified Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 2647243002: PaymentApp: Implement PaymentAppProvider for LayoutTest.
Patch Set: PaymentApp: Implement PaymentAppProvider for LayoutTest. Created 3 years, 11 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
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/layout_test/blink_test_runner.cc
diff --git a/content/shell/renderer/layout_test/blink_test_runner.cc b/content/shell/renderer/layout_test/blink_test_runner.cc
index adee3a939ca936178f05ad598e6f7abff7e8e23b..5a6b7ba59bc619500202d50abe602227280b9864 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -252,10 +252,10 @@ WebURL RewriteAbsolutePathInWPT(const std::string& utf8_url) {
BlinkTestRunner::BlinkTestRunner(RenderView* render_view)
: RenderViewObserver(render_view),
RenderViewObserverTracker<BlinkTestRunner>(render_view),
+ payment_app_provider_(nullptr),
is_main_window_(false),
focus_on_next_commit_(false),
- leak_detector_(new LeakDetector(this)) {
-}
+ leak_detector_(new LeakDetector(this)) {}
BlinkTestRunner::~BlinkTestRunner() {
}
@@ -551,6 +551,15 @@ void BlinkTestRunner::SendBluetoothManualChooserEvent(
argument));
}
+void BlinkTestRunner::GetAllPaymentAppIDs(
+ const base::Callback<void(const std::vector<int64_t>&)>& callback) {
+ GetPaymentAppProvider().GetAllPaymentAppIDs(callback);
+}
+
+void BlinkTestRunner::InvokePaymentApp(int64_t registration_id) {
+ GetPaymentAppProvider().InvokePaymentApp(registration_id);
+}
+
void BlinkTestRunner::SetFocus(blink::WebView* web_view, bool focus) {
RenderView* render_view = RenderView::FromWebView(web_view);
if (render_view) // Check whether |web_view| has been already closed.
@@ -947,6 +956,14 @@ BlinkTestRunner::GetBluetoothFakeAdapterSetter() {
return *bluetooth_fake_adapter_setter_;
}
+mojom::LayoutTestPaymentAppProvider& BlinkTestRunner::GetPaymentAppProvider() {
+ if (!payment_app_provider_) {
+ RenderThread::Get()->GetRemoteInterfaces()->GetInterface(
+ mojo::MakeRequest(&payment_app_provider_));
+ }
+ return *payment_app_provider_;
+}
+
void BlinkTestRunner::OnSetupSecondaryRenderer() {
DCHECK(!is_main_window_);
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698