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

Unified Diff: ios/chrome/browser/payments/payment_request_web_state_observer.mm

Issue 2585233003: Upstream Chrome on iOS source code [2/11]. (Closed)
Patch Set: Created 4 years 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: ios/chrome/browser/payments/payment_request_web_state_observer.mm
diff --git a/ios/chrome/browser/payments/payment_request_web_state_observer.mm b/ios/chrome/browser/payments/payment_request_web_state_observer.mm
new file mode 100644
index 0000000000000000000000000000000000000000..f8c2b230003b448fcd8c648653d276d4d0d2d804
--- /dev/null
+++ b/ios/chrome/browser/payments/payment_request_web_state_observer.mm
@@ -0,0 +1,22 @@
+// Copyright 2016 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.
+
+#import "ios/chrome/browser/payments/payment_request_web_state_observer.h"
+
+PaymentRequestWebStateObserver::PaymentRequestWebStateObserver(
+ id<PaymentRequestWebStateDelegate> delegate)
+ : web::WebStateObserver(), delegate_(delegate) {}
+
+PaymentRequestWebStateObserver::~PaymentRequestWebStateObserver() {}
+
+void PaymentRequestWebStateObserver::ObserveWebState(web::WebState* web_state) {
+ Observe(web_state);
+}
+
+void PaymentRequestWebStateObserver::PageLoaded(
+ web::PageLoadCompletionStatus load_completion_status) {
+ if ([delegate_ respondsToSelector:@selector(pageLoadedWithStatus:)]) {
+ [delegate_ pageLoadedWithStatus:load_completion_status];
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698