diff --git a/DEPS b/DEPS index 213efd7..36c25ee 100644 --- a/DEPS +++ b/DEPS
@@ -40,7 +40,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '745337aec10a2075b4c3af40b73b8f33b9bd52c2', + 'skia_revision': '7fee90cb5eda2345bb8ec9be706aea1a09866005', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other.
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index 2d73b88..74ae6d7 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn
@@ -185,9 +185,9 @@ "//components/navigation_interception/android:navigation_interception_java", "//components/ntp_tiles/android:ntp_tiles_java", "//components/offline_items_collection/core:core_java", - "//components/payments/content:mojom_java", - "//components/payments/content:mojom_parser_java", "//components/payments/content/android:java", + "//components/payments/mojom:mojom_java", + "//components/payments/mojom:mojom_parser_java", "//components/policy/android:policy_java", "//components/precache/android:precache_java", "//components/safe_browsing_db/android:safe_browsing_java", @@ -348,9 +348,9 @@ "//components/invalidation/impl:java", "//components/minidump_uploader:minidump_uploader_java", "//components/offline_items_collection/core:core_java", - "//components/payments/content:mojom_java", - "//components/payments/content:mojom_parser_java", "//components/payments/content/android:java", + "//components/payments/mojom:mojom_java", + "//components/payments/mojom:mojom_parser_java", "//components/signin/core/browser/android:java", "//components/signin/core/browser/android:signin_java_test_support", "//components/sync:sync_java_test_support", @@ -435,9 +435,9 @@ "//components/minidump_uploader:minidump_uploader_javatests", "//components/navigation_interception/android:navigation_interception_java", "//components/offline_items_collection/core:core_java", - "//components/payments/content:mojom_java", - "//components/payments/content:mojom_parser_java", "//components/payments/content/android:java", + "//components/payments/mojom:mojom_java", + "//components/payments/mojom:mojom_parser_java", "//components/policy/android:policy_java", "//components/precache/android:precache_java", "//components/precache/android:precache_javatests",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index ab942d6..fbf1c51 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -1514,8 +1514,8 @@ "//components/password_manager/core/browser", "//components/password_manager/core/common", "//components/password_manager/sync/browser", - "//components/payments/content:mojom", - "//components/payments/content:mojom_payment_app", + "//components/payments/mojom", + "//components/payments/mojom:mojom_payment_app", "//components/physical_web/eddystone", "//components/policy:generated", "//components/policy/core/browser",
diff --git a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc index 260f37c7..6f08a1a 100644 --- a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc +++ b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
@@ -10,7 +10,7 @@ #include "base/android/jni_string.h" #include "base/android/scoped_java_ref.h" #include "chrome/browser/profiles/profile_manager.h" -#include "components/payments/content/payment_app.mojom.h" +#include "components/payments/mojom/payment_app.mojom.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/payment_app_provider.h" #include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 260c28e2..9679ace6 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc
@@ -283,7 +283,7 @@ #include "chrome/browser/android/service_tab_launcher.h" #include "chrome/browser/android/tab_android.h" #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" -#include "components/payments/content/payment_request.mojom.h" +#include "components/payments/mojom/payment_request.mojom.h" #include "content/public/browser/android/java_interfaces.h" #include "ui/base/ui_base_paths.h" #else
diff --git a/chrome/browser/payments/payment_request_factory.h b/chrome/browser/payments/payment_request_factory.h index f2120f29..f77e1bf 100644 --- a/chrome/browser/payments/payment_request_factory.h +++ b/chrome/browser/payments/payment_request_factory.h
@@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_FACTORY_H_ #define CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_FACTORY_H_ -#include "components/payments/content/payment_request.mojom.h" +#include "components/payments/mojom/payment_request.mojom.h" #include "mojo/public/cpp/bindings/binding.h" namespace content {
diff --git a/chrome/browser/ui/views/payments/payment_request_browsertest_base.h b/chrome/browser/ui/views/payments/payment_request_browsertest_base.h index 3f90fe8..dd39f3b 100644 --- a/chrome/browser/ui/views/payments/payment_request_browsertest_base.h +++ b/chrome/browser/ui/views/payments/payment_request_browsertest_base.h
@@ -20,7 +20,7 @@ #include "components/autofill/core/browser/field_types.h" #include "components/autofill/core/browser/personal_data_manager_observer.h" #include "components/payments/content/payment_request.h" -#include "components/payments/content/payment_request.mojom.h" +#include "components/payments/mojom/payment_request.mojom.h" #include "net/test/embedded_test_server/embedded_test_server.h" #include "testing/gmock/include/gmock/gmock.h" #include "ui/views/widget/widget_observer.h"
diff --git a/chrome/browser/ui/views/payments/payment_request_views_util.h b/chrome/browser/ui/views/payments/payment_request_views_util.h index 189618aa..a6a2ef0 100644 --- a/chrome/browser/ui/views/payments/payment_request_views_util.h +++ b/chrome/browser/ui/views/payments/payment_request_views_util.h
@@ -9,7 +9,7 @@ #include <string> #include "base/strings/string16.h" -#include "components/payments/content/payment_request.mojom.h" +#include "components/payments/mojom/payment_request.mojom.h" namespace autofill { class AutofillProfile;
diff --git a/components/payments/android/BUILD.gn b/components/payments/android/BUILD.gn index fc5fe8b9..7eac568b 100644 --- a/components/payments/android/BUILD.gn +++ b/components/payments/android/BUILD.gn
@@ -11,7 +11,7 @@ ] deps = [ - "//components/payments/content:mojom_parser", + "//components/payments/mojom:mojom_parser", "//components/webdata/common", "//sql", ]
diff --git a/components/payments/android/DEPS b/components/payments/android/DEPS index 0d58d2f..6d4be5a9 100644 --- a/components/payments/android/DEPS +++ b/components/payments/android/DEPS
@@ -1,5 +1,5 @@ include_rules = [ - "+components/payments/content", + "-components/payments/content", "+components/webdata/common", "+sql", ] \ No newline at end of file
diff --git a/components/payments/android/web_app_manifest_section_table.h b/components/payments/android/web_app_manifest_section_table.h index 44a5c046..7c46bcc 100644 --- a/components/payments/android/web_app_manifest_section_table.h +++ b/components/payments/android/web_app_manifest_section_table.h
@@ -8,7 +8,7 @@ #include <string> #include <vector> -#include "components/payments/content/payment_manifest_parser.mojom.h" +#include "components/payments/mojom/payment_manifest_parser.mojom.h" #include "components/webdata/common/web_database.h" #include "components/webdata/common/web_database_table.h"
diff --git a/components/payments/content/BUILD.gn b/components/payments/content/BUILD.gn index a200799..ac16b7b5 100644 --- a/components/payments/content/BUILD.gn +++ b/components/payments/content/BUILD.gn
@@ -2,8 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//mojo/public/tools/bindings/mojom.gni") - static_library("content") { sources = [ "payment_request.cc", @@ -20,44 +18,16 @@ ] deps = [ - ":mojom", ":utils", "//components/autofill/core/browser", "//components/payments/core", + "//components/payments/mojom", "//content/public/browser", "//mojo/public/cpp/bindings", "//third_party/libphonenumber", ] } -mojom("mojom") { - sources = [ - "payment_request.mojom", - ] -} - -mojom("mojom_parser") { - sources = [ - "payment_manifest_parser.mojom", - ] - - public_deps = [ - "//url/mojo:url_mojom_gurl", - ] -} - -mojom("mojom_payment_app") { - sources = [ - "payment_app.mojom", - ] - - public_deps = [ - ":mojom", - "//mojo/common:common_custom_types", - "//url/mojo:url_mojom_gurl", - ] -} - static_library("utils") { sources = [ "payment_details_validation.cc", @@ -71,13 +41,13 @@ ] deps = [ - ":mojom", - ":mojom_parser", "//base", "//components/autofill/core/browser", "//components/data_use_measurement/core", "//components/link_header_util", "//components/payments/core", + "//components/payments/mojom", + "//components/payments/mojom:mojom_parser", "//components/strings", "//content/public/browser", "//net", @@ -104,13 +74,13 @@ deps = [ ":content", - ":mojom", ":utils", "//base", "//base/test:test_support", "//components/autofill/core/browser", "//components/autofill/core/browser:test_support", "//components/payments/core", + "//components/payments/mojom", "//content/test:test_support", "//net:test_support", "//testing/gtest",
diff --git a/components/payments/content/android/BUILD.gn b/components/payments/content/android/BUILD.gn index 609224f14..46d2578 100644 --- a/components/payments/content/android/BUILD.gn +++ b/components/payments/content/android/BUILD.gn
@@ -22,9 +22,9 @@ deps = [ ":jni_headers", "//base", - "//components/payments/content:mojom", "//components/payments/content:utils", "//components/payments/core", + "//components/payments/mojom", "//content/public/browser", "//net", ] @@ -49,8 +49,8 @@ ] deps = [ "//base:base_java", - "//components/payments/content:mojom_java", - "//components/payments/content:mojom_parser_java", + "//components/payments/mojom:mojom_java", + "//components/payments/mojom:mojom_parser_java", "//content/public/android:content_java", "//mojo/public/java:bindings_java", ]
diff --git a/components/payments/content/android/payment_details_validation_android.cc b/components/payments/content/android/payment_details_validation_android.cc index ddc7ffc..fa88d63 100644 --- a/components/payments/content/android/payment_details_validation_android.cc +++ b/components/payments/content/android/payment_details_validation_android.cc
@@ -13,7 +13,7 @@ #include "base/android/jni_android.h" #include "components/payments/content/payment_details_validation.h" -#include "components/payments/content/payment_request.mojom.h" +#include "components/payments/mojom/payment_request.mojom.h" #include "jni/PaymentValidator_jni.h" namespace payments {
diff --git a/components/payments/content/payment_details_validation.cc b/components/payments/content/payment_details_validation.cc index 351e82c..c894459 100644 --- a/components/payments/content/payment_details_validation.cc +++ b/components/payments/content/payment_details_validation.cc
@@ -7,8 +7,8 @@ #include <set> #include <vector> -#include "components/payments/content/payment_request.mojom.h" #include "components/payments/content/payments_validators.h" +#include "components/payments/mojom/payment_request.mojom.h" namespace payments { namespace {
diff --git a/components/payments/content/payment_details_validation.h b/components/payments/content/payment_details_validation.h index e623087..fda9990 100644 --- a/components/payments/content/payment_details_validation.h +++ b/components/payments/content/payment_details_validation.h
@@ -7,7 +7,7 @@ #include <string> -#include "components/payments/content/payment_request.mojom.h" +#include "components/payments/mojom/payment_request.mojom.h" namespace payments {
diff --git a/components/payments/content/payment_manifest_parser_host.h b/components/payments/content/payment_manifest_parser_host.h index 2873bdf6..eb68875 100644 --- a/components/payments/content/payment_manifest_parser_host.h +++ b/components/payments/content/payment_manifest_parser_host.h
@@ -13,7 +13,7 @@ #include "base/callback_forward.h" #include "base/macros.h" -#include "components/payments/content/payment_manifest_parser.mojom.h" +#include "components/payments/mojom/payment_manifest_parser.mojom.h" #include "url/gurl.h" namespace content {
diff --git a/components/payments/content/payment_request.h b/components/payments/content/payment_request.h index ad2abed..d609c83 100644 --- a/components/payments/content/payment_request.h +++ b/components/payments/content/payment_request.h
@@ -9,10 +9,10 @@ #include <vector> #include "base/macros.h" -#include "components/payments/content/payment_request.mojom.h" #include "components/payments/content/payment_request_spec.h" #include "components/payments/content/payment_request_state.h" #include "components/payments/core/payment_request_delegate.h" +#include "components/payments/mojom/payment_request.mojom.h" #include "mojo/public/cpp/bindings/binding.h" #include "mojo/public/cpp/bindings/interface_request.h"
diff --git a/components/payments/content/payment_request_spec.h b/components/payments/content/payment_request_spec.h index de0187a..5d9273b 100644 --- a/components/payments/content/payment_request_spec.h +++ b/components/payments/content/payment_request_spec.h
@@ -11,9 +11,9 @@ #include "base/macros.h" #include "base/observer_list.h" -#include "components/payments/content/payment_request.mojom.h" #include "components/payments/core/currency_formatter.h" #include "components/payments/core/payment_options_provider.h" +#include "components/payments/mojom/payment_request.mojom.h" namespace payments {
diff --git a/components/payments/content/payment_request_spec_unittest.cc b/components/payments/content/payment_request_spec_unittest.cc index a90d1e4..f9f2a86f 100644 --- a/components/payments/content/payment_request_spec_unittest.cc +++ b/components/payments/content/payment_request_spec_unittest.cc
@@ -7,7 +7,7 @@ #include <utility> #include "base/memory/weak_ptr.h" -#include "components/payments/content/payment_request.mojom.h" +#include "components/payments/mojom/payment_request.mojom.h" #include "testing/gtest/include/gtest/gtest.h" namespace payments {
diff --git a/components/payments/content/payment_request_state.h b/components/payments/content/payment_request_state.h index cb0b2a9..dcef090b 100644 --- a/components/payments/content/payment_request_state.h +++ b/components/payments/content/payment_request_state.h
@@ -11,8 +11,8 @@ #include "base/macros.h" #include "base/observer_list.h" -#include "components/payments/content/payment_request.mojom.h" #include "components/payments/content/payment_response_helper.h" +#include "components/payments/mojom/payment_request.mojom.h" namespace i18n { namespace addressinput {
diff --git a/components/payments/content/payment_request_state_unittest.cc b/components/payments/content/payment_request_state_unittest.cc index 8509777..6b18b17 100644 --- a/components/payments/content/payment_request_state_unittest.cc +++ b/components/payments/content/payment_request_state_unittest.cc
@@ -12,8 +12,8 @@ #include "components/autofill/core/browser/autofill_test_utils.h" #include "components/autofill/core/browser/credit_card.h" #include "components/autofill/core/browser/test_personal_data_manager.h" -#include "components/payments/content/payment_request.mojom.h" #include "components/payments/content/payment_request_spec.h" +#include "components/payments/mojom/payment_request.mojom.h" #include "testing/gtest/include/gtest/gtest.h" namespace payments {
diff --git a/components/payments/content/payment_request_web_contents_manager.h b/components/payments/content/payment_request_web_contents_manager.h index 0843358..be08a3d 100644 --- a/components/payments/content/payment_request_web_contents_manager.h +++ b/components/payments/content/payment_request_web_contents_manager.h
@@ -10,7 +10,7 @@ #include "base/macros.h" #include "components/payments/content/payment_request.h" -#include "components/payments/content/payment_request.mojom.h" +#include "components/payments/mojom/payment_request.mojom.h" #include "content/public/browser/web_contents_user_data.h" #include "mojo/public/cpp/bindings/binding.h"
diff --git a/components/payments/content/payment_response_helper.h b/components/payments/content/payment_response_helper.h index c8903e2..69e0383 100644 --- a/components/payments/content/payment_response_helper.h +++ b/components/payments/content/payment_response_helper.h
@@ -6,8 +6,8 @@ #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_RESPONSE_HELPER_H_ #include "base/macros.h" -#include "components/payments/content/payment_request.mojom.h" #include "components/payments/core/payment_instrument.h" +#include "components/payments/mojom/payment_request.mojom.h" namespace autofill { class AutofillProfile;
diff --git a/components/payments/content/payment_response_helper_unittest.cc b/components/payments/content/payment_response_helper_unittest.cc index 7f63b66..efbe6f3 100644 --- a/components/payments/content/payment_response_helper_unittest.cc +++ b/components/payments/content/payment_response_helper_unittest.cc
@@ -15,10 +15,10 @@ #include "components/autofill/core/browser/autofill_test_utils.h" #include "components/autofill/core/browser/credit_card.h" #include "components/autofill/core/browser/test_personal_data_manager.h" -#include "components/payments/content/payment_request.mojom.h" #include "components/payments/content/payment_request_spec.h" #include "components/payments/core/autofill_payment_instrument.h" #include "components/payments/core/payment_request_delegate.h" +#include "components/payments/mojom/payment_request.mojom.h" #include "testing/gtest/include/gtest/gtest.h" namespace payments {
diff --git a/components/payments/content/payments_validators.h b/components/payments/content/payments_validators.h index 135074cc..33af759 100644 --- a/components/payments/content/payments_validators.h +++ b/components/payments/content/payments_validators.h
@@ -8,7 +8,7 @@ #include <string> #include "base/macros.h" -#include "components/payments/content/payment_request.mojom.h" +#include "components/payments/mojom/payment_request.mojom.h" namespace payments {
diff --git a/components/payments/content/utility/BUILD.gn b/components/payments/content/utility/BUILD.gn index 643a1b64..d202928 100644 --- a/components/payments/content/utility/BUILD.gn +++ b/components/payments/content/utility/BUILD.gn
@@ -11,7 +11,7 @@ ] deps = [ "//base", - "//components/payments/content:mojom_parser", + "//components/payments/mojom:mojom_parser", "//url", ] }
diff --git a/components/payments/content/utility/payment_manifest_parser.h b/components/payments/content/utility/payment_manifest_parser.h index 3e74394..5f0fbe8b 100644 --- a/components/payments/content/utility/payment_manifest_parser.h +++ b/components/payments/content/utility/payment_manifest_parser.h
@@ -9,7 +9,7 @@ #include <vector> #include "base/macros.h" -#include "components/payments/content/payment_manifest_parser.mojom.h" +#include "components/payments/mojom/payment_manifest_parser.mojom.h" #include "url/gurl.h" namespace payments {
diff --git a/components/payments/mojom/BUILD.gn b/components/payments/mojom/BUILD.gn new file mode 100644 index 0000000..9268a07 --- /dev/null +++ b/components/payments/mojom/BUILD.gn
@@ -0,0 +1,33 @@ +# Copyright 2017 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("//mojo/public/tools/bindings/mojom.gni") + +mojom("mojom") { + sources = [ + "payment_request.mojom", + ] +} + +mojom("mojom_parser") { + sources = [ + "payment_manifest_parser.mojom", + ] + + public_deps = [ + "//url/mojo:url_mojom_gurl", + ] +} + +mojom("mojom_payment_app") { + sources = [ + "payment_app.mojom", + ] + + public_deps = [ + ":mojom", + "//mojo/common:common_custom_types", + "//url/mojo:url_mojom_gurl", + ] +}
diff --git a/components/payments/content/OWNERS b/components/payments/mojom/OWNERS similarity index 100% rename from components/payments/content/OWNERS rename to components/payments/mojom/OWNERS
diff --git a/components/payments/content/payment_app.mojom b/components/payments/mojom/payment_app.mojom similarity index 95% rename from components/payments/content/payment_app.mojom rename to components/payments/mojom/payment_app.mojom index a980ddc..f7eae0a4 100644 --- a/components/payments/content/payment_app.mojom +++ b/components/payments/mojom/payment_app.mojom
@@ -4,7 +4,7 @@ module payments.mojom; -import "components/payments/content/payment_request.mojom"; +import "components/payments/mojom/payment_request.mojom"; import "mojo/common/time.mojom"; import "url/mojo/url.mojom";
diff --git a/components/payments/content/payment_manifest_parser.mojom b/components/payments/mojom/payment_manifest_parser.mojom similarity index 100% rename from components/payments/content/payment_manifest_parser.mojom rename to components/payments/mojom/payment_manifest_parser.mojom
diff --git a/components/payments/content/payment_request.mojom b/components/payments/mojom/payment_request.mojom similarity index 100% rename from components/payments/content/payment_request.mojom rename to components/payments/mojom/payment_request.mojom
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index 75dd323..580a9d28 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn
@@ -44,7 +44,7 @@ "//components/leveldb:lib", "//components/link_header_util", "//components/mime_util", - "//components/payments/content:mojom_payment_app", + "//components/payments/mojom:mojom_payment_app", "//components/rappor", "//components/tracing", "//components/tracing:startup_tracing",
diff --git a/content/browser/payments/payment_app_browsertest.cc b/content/browser/payments/payment_app_browsertest.cc index 9f840a0..e6183f0 100644 --- a/content/browser/payments/payment_app_browsertest.cc +++ b/content/browser/payments/payment_app_browsertest.cc
@@ -5,7 +5,7 @@ #include "base/command_line.h" #include "base/macros.h" #include "base/run_loop.h" -#include "components/payments/content/payment_app.mojom.h" +#include "components/payments/mojom/payment_app.mojom.h" #include "content/public/browser/payment_app_provider.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_switches.h"
diff --git a/content/browser/payments/payment_app_content_unittest_base.h b/content/browser/payments/payment_app_content_unittest_base.h index 9461e5fa..7a63fec 100644 --- a/content/browser/payments/payment_app_content_unittest_base.h +++ b/content/browser/payments/payment_app_content_unittest_base.h
@@ -11,7 +11,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" -#include "components/payments/content/payment_app.mojom.h" +#include "components/payments/mojom/payment_app.mojom.h" #include "content/browser/payments/payment_manager.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h"
diff --git a/content/browser/payments/payment_app_context_impl.h b/content/browser/payments/payment_app_context_impl.h index 2b9aa8f..259b53da 100644 --- a/content/browser/payments/payment_app_context_impl.h +++ b/content/browser/payments/payment_app_context_impl.h
@@ -10,7 +10,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" -#include "components/payments/content/payment_app.mojom.h" +#include "components/payments/mojom/payment_app.mojom.h" #include "content/browser/payments/payment_app_database.h" #include "content/common/content_export.h"
diff --git a/content/browser/payments/payment_app_database.h b/content/browser/payments/payment_app_database.h index 8e83b60..2e6ec55 100644 --- a/content/browser/payments/payment_app_database.h +++ b/content/browser/payments/payment_app_database.h
@@ -10,7 +10,7 @@ #include "base/macros.h" #include "base/memory/weak_ptr.h" -#include "components/payments/content/payment_app.mojom.h" +#include "components/payments/mojom/payment_app.mojom.h" #include "content/browser/service_worker/service_worker_context_wrapper.h" #include "content/browser/service_worker/service_worker_registration.h" #include "content/common/content_export.h"
diff --git a/content/browser/payments/payment_app_provider_impl_unittest.cc b/content/browser/payments/payment_app_provider_impl_unittest.cc index 1872cc8..83be68b4 100644 --- a/content/browser/payments/payment_app_provider_impl_unittest.cc +++ b/content/browser/payments/payment_app_provider_impl_unittest.cc
@@ -8,7 +8,7 @@ #include "base/macros.h" #include "base/run_loop.h" -#include "components/payments/content/payment_app.mojom.h" +#include "components/payments/mojom/payment_app.mojom.h" #include "content/browser/payments/payment_app_content_unittest_base.h" #include "content/browser/payments/payment_app_provider_impl.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/browser/payments/payment_manager.h b/content/browser/payments/payment_manager.h index 6872ad2..496e8ee 100644 --- a/content/browser/payments/payment_manager.h +++ b/content/browser/payments/payment_manager.h
@@ -9,7 +9,7 @@ #include "base/macros.h" #include "base/memory/weak_ptr.h" -#include "components/payments/content/payment_app.mojom.h" +#include "components/payments/mojom/payment_app.mojom.h" #include "content/common/content_export.h" #include "mojo/public/cpp/bindings/binding.h" #include "url/gurl.h"
diff --git a/content/browser/payments/payment_manager_unittest.cc b/content/browser/payments/payment_manager_unittest.cc index ebed2ae..fd01718b 100644 --- a/content/browser/payments/payment_manager_unittest.cc +++ b/content/browser/payments/payment_manager_unittest.cc
@@ -5,7 +5,7 @@ #include <utility> #include "base/macros.h" -#include "components/payments/content/payment_app.mojom.h" +#include "components/payments/mojom/payment_app.mojom.h" #include "content/browser/payments/payment_app_content_unittest_base.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h"
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn index fd5c0dc..bf9aca2 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn
@@ -614,7 +614,7 @@ public_deps = [ "//components/leveldb/public/interfaces", - "//components/payments/content:mojom_payment_app", + "//components/payments/mojom:mojom_payment_app", "//content/public/common:interfaces", # TODO(mcasas): remove the following dep after https://crbug.com/653994
diff --git a/content/common/service_worker/service_worker_event_dispatcher.mojom b/content/common/service_worker/service_worker_event_dispatcher.mojom index 2f309bb3..42d1218c 100644 --- a/content/common/service_worker/service_worker_event_dispatcher.mojom +++ b/content/common/service_worker/service_worker_event_dispatcher.mojom
@@ -4,7 +4,7 @@ module content.mojom; -import "components/payments/content/payment_app.mojom"; +import "components/payments/mojom/payment_app.mojom"; import "content/common/url_loader.mojom"; import "mojo/common/string16.mojom"; import "mojo/common/time.mojom";
diff --git a/content/public/browser/DEPS b/content/public/browser/DEPS index ec5000d..e779c4c 100644 --- a/content/public/browser/DEPS +++ b/content/public/browser/DEPS
@@ -1,5 +1,5 @@ include_rules = [ - "+components/payments/content/payment_app.mojom.h", + "+components/payments/mojom/payment_app.mojom.h", "+device/screen_orientation/public/interfaces", ]
diff --git a/content/public/browser/payment_app_provider.h b/content/public/browser/payment_app_provider.h index 646c3d1..9a86d01 100644 --- a/content/public/browser/payment_app_provider.h +++ b/content/public/browser/payment_app_provider.h
@@ -10,7 +10,7 @@ #include <vector> #include "base/callback_forward.h" -#include "components/payments/content/payment_app.mojom.h" +#include "components/payments/mojom/payment_app.mojom.h" #include "content/common/content_export.h" namespace content {
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn index 54ac85e2..9d95d274 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn
@@ -432,7 +432,7 @@ "//cc/surfaces:surface_id", "//cc/surfaces:surfaces", "//components/discardable_memory/client", - "//components/payments/content:mojom_payment_app", + "//components/payments/mojom:mojom_payment_app", "//components/url_formatter", "//components/variations", "//content:resources",
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h index 967eaf8..3ec1e59 100644 --- a/content/renderer/service_worker/service_worker_context_client.h +++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -19,7 +19,7 @@ #include "base/memory/ref_counted.h" #include "base/strings/string16.h" #include "base/time/time.h" -#include "components/payments/content/payment_app.mojom.h" +#include "components/payments/mojom/payment_app.mojom.h" #include "content/child/webmessageportchannel_impl.h" #include "content/common/service_worker/embedded_worker.mojom.h" #include "content/common/service_worker/service_worker_event_dispatcher.mojom.h"
diff --git a/content/renderer/service_worker/service_worker_type_converters.h b/content/renderer/service_worker/service_worker_type_converters.h index e5dc1f6..28b5e68a 100644 --- a/content/renderer/service_worker/service_worker_type_converters.h +++ b/content/renderer/service_worker/service_worker_type_converters.h
@@ -5,7 +5,7 @@ #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_TYPE_CONVERTERS_H_ #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_TYPE_CONVERTERS_H_ -#include "components/payments/content/payment_app.mojom.h" +#include "components/payments/mojom/payment_app.mojom.h" #include "content/common/service_worker/service_worker_event_dispatcher.mojom.h" #include "content/common/service_worker/service_worker_status_code.h" #include "third_party/WebKit/public/platform/modules/payments/WebPaymentAppRequest.h"
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index 7f302a30..a1ac65ff 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn
@@ -239,7 +239,7 @@ "//cc/surfaces", "//components/display_compositor", "//components/leveldb/public/interfaces", - "//components/payments/content:mojom_payment_app", + "//components/payments/mojom:mojom_payment_app", "//content/app:both_for_content_tests", "//content/browser:for_content_tests", "//content/browser/speech/proto", @@ -726,7 +726,7 @@ "//components/discardable_memory/client", "//components/discardable_memory/common", "//components/discardable_memory/service", - "//components/payments/content:mojom_payment_app", + "//components/payments/mojom:mojom_payment_app", "//content:resources", "//content/app:both_for_content_tests", "//content/browser:for_content_tests", @@ -1442,8 +1442,8 @@ "//cc/surfaces", "//components/display_compositor", "//components/leveldb/public/cpp", - "//components/payments/content:mojom", - "//components/payments/content:mojom_payment_app", + "//components/payments/mojom", + "//components/payments/mojom:mojom_payment_app", "//components/rappor:test_support", "//content:resources", "//content/app:both_for_content_tests",
diff --git a/ios/chrome/browser/payments/cells/payments_text_item.h b/ios/chrome/browser/payments/cells/payments_text_item.h index ab3c143..8308ac2 100644 --- a/ios/chrome/browser/payments/cells/payments_text_item.h +++ b/ios/chrome/browser/payments/cells/payments_text_item.h
@@ -13,26 +13,35 @@ // PaymentsTextItem is the model class corresponding to PaymentsTextCell. @interface PaymentsTextItem : CollectionViewItem -// The message to display. +// The main text to display. @property(nonatomic, copy) NSString* text; +// The secondary text to display. +@property(nonatomic, copy) NSString* detailText; + // The image to display. @property(nonatomic, strong) UIImage* image; +// The accessory type for the represented cell. +@property(nonatomic) MDCCollectionViewCellAccessoryType accessoryType; + @end // PaymentsTextCell implements a MDCCollectionViewCell subclass containing -// a text label and an optional image. The label is laid out to fill the full -// width of the cell and is wrapped as needed to fit in the cell. The image is -// laid out on the leading edge of the cell. The text label is laid out on the -// the trailing edge of the image, if one exists, or the leading edge of the -// cell otherwise, up to the trailing edge of the cell. This is suitable for -// displaying text that needs to wrap which may or may not feature an image. +// a main text label, a secondary text label and an optional image. The labels +// are laid out to fill the full width of the cell and are wrapped as needed to +// fit in the cell. The image is laid out on the leading edge of the cell. The +// text labels are laid out on the the trailing edge of the image, if one +// exists, or the leading edge of the cell otherwise, up to the trailing edge of +// the cell. @interface PaymentsTextCell : MDCCollectionViewCell // UILabel corresponding to |text| from the item. @property(nonatomic, readonly, strong) UILabel* textLabel; +// UILabel corresponding to |detailText| from the item. +@property(nonatomic, readonly, strong) UILabel* detailTextLabel; + // UIImageView corresponding to |image| from the item. @property(nonatomic, readonly, strong) UIImageView* imageView;
diff --git a/ios/chrome/browser/payments/cells/payments_text_item.mm b/ios/chrome/browser/payments/cells/payments_text_item.mm index 274f93e..bc026ad 100644 --- a/ios/chrome/browser/payments/cells/payments_text_item.mm +++ b/ios/chrome/browser/payments/cells/payments_text_item.mm
@@ -18,14 +18,19 @@ // Padding of the top and bottom edges of the cell. const CGFloat kVerticalPadding = 16; -// Spacing between the image and the text label. -const CGFloat kHorizontalSpacingBetweenImageAndLabel = 8; +// Spacing between the image and the text labels. +const CGFloat kHorizontalSpacingBetweenImageAndLabels = 8; + +// Spacing between the labels. +const CGFloat kVerticalSpacingBetweenLabels = 8; } // namespace @implementation PaymentsTextItem @synthesize text = _text; +@synthesize detailText = _detailText; @synthesize image = _image; +@synthesize accessoryType = _accessoryType; #pragma mark CollectionViewItem @@ -39,21 +44,25 @@ - (void)configureCell:(PaymentsTextCell*)cell { [super configureCell:cell]; + cell.accessoryType = self.accessoryType; cell.textLabel.text = self.text; + cell.detailTextLabel.text = self.detailText; cell.imageView.image = self.image; } @end @interface PaymentsTextCell () { - NSLayoutConstraint* _textLeadingAnchorConstraint; + NSLayoutConstraint* _labelsLeadingAnchorConstraint; NSLayoutConstraint* _imageLeadingAnchorConstraint; + UIStackView* _stackView; } @end @implementation PaymentsTextCell @synthesize textLabel = _textLabel; +@synthesize detailTextLabel = _detailTextLabel; @synthesize imageView = _imageView; - (instancetype)initWithFrame:(CGRect)frame { @@ -72,9 +81,21 @@ UIView* contentView = self.contentView; contentView.clipsToBounds = YES; + _stackView = [[UIStackView alloc] initWithArrangedSubviews:@[]]; + _stackView.axis = UILayoutConstraintAxisVertical; + _stackView.layoutMarginsRelativeArrangement = YES; + _stackView.layoutMargins = UIEdgeInsetsMake( + kVerticalPadding, 0, kVerticalPadding, kHorizontalPadding); + _stackView.alignment = UIStackViewAlignmentLeading; + _stackView.spacing = kVerticalSpacingBetweenLabels; + _stackView.translatesAutoresizingMaskIntoConstraints = NO; + [contentView addSubview:_stackView]; + _textLabel = [[UILabel alloc] init]; - _textLabel.translatesAutoresizingMaskIntoConstraints = NO; - [contentView addSubview:_textLabel]; + [_stackView addArrangedSubview:_textLabel]; + + _detailTextLabel = [[UILabel alloc] init]; + [_stackView addArrangedSubview:_detailTextLabel]; _imageView = [[UIImageView alloc] initWithFrame:CGRectZero]; _imageView.translatesAutoresizingMaskIntoConstraints = NO; @@ -83,30 +104,34 @@ // Set default font and text colors for labels. - (void)setDefaultViewStyling { - _textLabel.font = [MDCTypography body1Font]; + _textLabel.font = [MDCTypography body2Font]; _textLabel.textColor = [[MDCPalette greyPalette] tint900]; _textLabel.numberOfLines = 0; _textLabel.lineBreakMode = NSLineBreakByWordWrapping; + + _detailTextLabel.font = [MDCTypography body1Font]; + _detailTextLabel.textColor = [[MDCPalette greyPalette] tint900]; + _detailTextLabel.numberOfLines = 0; + _detailTextLabel.lineBreakMode = NSLineBreakByWordWrapping; } // Set constraints on subviews. - (void)setViewConstraints { UIView* contentView = self.contentView; - _textLeadingAnchorConstraint = [_textLabel.leadingAnchor - constraintEqualToAnchor:_imageView.trailingAnchor]; + _labelsLeadingAnchorConstraint = [_stackView.leadingAnchor + constraintEqualToAnchor:_imageView.trailingAnchor + constant:kHorizontalSpacingBetweenImageAndLabels]; _imageLeadingAnchorConstraint = [_imageView.leadingAnchor constraintEqualToAnchor:contentView.leadingAnchor constant:kHorizontalPadding]; [NSLayoutConstraint activateConstraints:@[ - [_textLabel.topAnchor constraintEqualToAnchor:self.contentView.topAnchor - constant:kVerticalPadding], - [_textLabel.bottomAnchor constraintEqualToAnchor:contentView.bottomAnchor - constant:-kVerticalPadding], + [_stackView.topAnchor constraintEqualToAnchor:self.contentView.topAnchor], + [_stackView.bottomAnchor constraintEqualToAnchor:contentView.bottomAnchor], [_imageView.centerYAnchor constraintEqualToAnchor:contentView.centerYAnchor], - _textLeadingAnchorConstraint, + _labelsLeadingAnchorConstraint, _imageLeadingAnchorConstraint, ]]; } @@ -116,23 +141,26 @@ // Implement -layoutSubviews as per instructions in documentation for // +[MDCCollectionViewCell cr_preferredHeightForWidth:forItem:]. - (void)layoutSubviews { + _textLabel.hidden = !_textLabel.text; + _detailTextLabel.hidden = !_detailTextLabel.text; + [super layoutSubviews]; - // Adjust the text label preferredMaxLayoutWidth when the parent's width + // Adjust the text labels' preferredMaxLayoutWidth when the parent's width // changes, for instance on screen rotation. CGFloat parentWidth = CGRectGetWidth(self.contentView.frame); + CGFloat preferredMaxLayoutWidth = parentWidth - (2 * kHorizontalPadding); if (_imageView.image) { - _textLabel.preferredMaxLayoutWidth = - parentWidth - (2 * kHorizontalPadding) - - kHorizontalSpacingBetweenImageAndLabel - _imageView.image.size.width; - _textLeadingAnchorConstraint.constant = - kHorizontalSpacingBetweenImageAndLabel; + preferredMaxLayoutWidth -= + kHorizontalSpacingBetweenImageAndLabels - _imageView.image.size.width; } else { - _textLabel.preferredMaxLayoutWidth = parentWidth - (2 * kHorizontalPadding); - _textLeadingAnchorConstraint.constant = 0; + _imageLeadingAnchorConstraint.constant = 0; + _labelsLeadingAnchorConstraint.constant = kHorizontalPadding; } + _textLabel.preferredMaxLayoutWidth = preferredMaxLayoutWidth; + _detailTextLabel.preferredMaxLayoutWidth = preferredMaxLayoutWidth; - // Re-layout with the new preferred width to allow the label to adjust its + // Re-layout with the new preferred width to allow the labels to adjust thier // height. [super layoutSubviews]; } @@ -142,13 +170,15 @@ - (void)prepareForReuse { [super prepareForReuse]; self.textLabel.text = nil; + self.detailTextLabel.text = nil; self.imageView.image = nil; } #pragma mark - NSObject(Accessibility) - (NSString*)accessibilityLabel { - return [NSString stringWithFormat:@"%@", self.textLabel.text]; + return [NSString stringWithFormat:@"%@, %@", self.textLabel.text, + self.detailTextLabel.text]; } @end
diff --git a/ios/chrome/browser/payments/cells/payments_text_item_unittest.mm b/ios/chrome/browser/payments/cells/payments_text_item_unittest.mm index 64f66dc..9c40280 100644 --- a/ios/chrome/browser/payments/cells/payments_text_item_unittest.mm +++ b/ios/chrome/browser/payments/cells/payments_text_item_unittest.mm
@@ -19,10 +19,12 @@ TEST(PaymentRequestPaymentsTextItemTest, TextLabelAndImage) { PaymentsTextItem* item = [[PaymentsTextItem alloc] initWithType:0]; - NSString* text = @"Lorem ipsum dolor sit amet"; + NSString* text = @"Lorem ipsum"; + NSString* detailText = @"Dolor sit amet"; UIImage* image = ios_internal::CollectionViewTestImage(); item.text = text; + item.detailText = detailText; item.image = image; id cell = [[[item cellClass] alloc] init]; @@ -30,10 +32,12 @@ PaymentsTextCell* paymentsTextCell = cell; EXPECT_FALSE(paymentsTextCell.textLabel.text); + EXPECT_FALSE(paymentsTextCell.detailTextLabel.text); EXPECT_FALSE(paymentsTextCell.imageView.image); [item configureCell:paymentsTextCell]; EXPECT_NSEQ(text, paymentsTextCell.textLabel.text); + EXPECT_NSEQ(detailText, paymentsTextCell.detailTextLabel.text); EXPECT_NSEQ(image, paymentsTextCell.imageView.image); }
diff --git a/ios/chrome/browser/payments/payment_method_selection_view_controller.mm b/ios/chrome/browser/payments/payment_method_selection_view_controller.mm index e07a402d..96c6ee0 100644 --- a/ios/chrome/browser/payments/payment_method_selection_view_controller.mm +++ b/ios/chrome/browser/payments/payment_method_selection_view_controller.mm
@@ -18,7 +18,6 @@ #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_detail_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" -#import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h" #import "ios/chrome/browser/ui/collection_view/collection_view_model.h" #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" #import "ios/chrome/browser/ui/icons/chrome_icon.h"
diff --git a/ios/chrome/browser/payments/payment_request_view_controller.mm b/ios/chrome/browser/payments/payment_request_view_controller.mm index 8539777b..f1341cc 100644 --- a/ios/chrome/browser/payments/payment_request_view_controller.mm +++ b/ios/chrome/browser/payments/payment_request_view_controller.mm
@@ -20,6 +20,7 @@ #import "ios/chrome/browser/payments/cells/autofill_profile_item.h" #import "ios/chrome/browser/payments/cells/page_info_item.h" #import "ios/chrome/browser/payments/cells/payment_method_item.h" +#import "ios/chrome/browser/payments/cells/payments_text_item.h" #import "ios/chrome/browser/payments/cells/price_item.h" #include "ios/chrome/browser/payments/payment_request.h" #import "ios/chrome/browser/payments/payment_request_util.h" @@ -29,7 +30,6 @@ #import "ios/chrome/browser/ui/collection_view/cells/collection_view_detail_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" -#import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h" #import "ios/chrome/browser/ui/collection_view/collection_view_model.h" #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" #include "ios/chrome/browser/ui/rtl_geometry.h" @@ -113,7 +113,7 @@ __weak PriceItem* _paymentSummaryItem; __weak AutofillProfileItem* _selectedShippingAddressItem; - __weak CollectionViewTextItem* _selectedShippingOptionItem; + __weak PaymentsTextItem* _selectedShippingOptionItem; __weak PaymentMethodItem* _selectedPaymentMethodItem; __weak AutofillProfileItem* _selectedContactInfoItem; } @@ -242,8 +242,8 @@ // Shipping section. [model addSectionWithIdentifier:SectionIdentifierShipping]; - CollectionViewTextItem* shippingTitle = - [[CollectionViewTextItem alloc] initWithType:ItemTypeShippingTitle]; + PaymentsTextItem* shippingTitle = + [[PaymentsTextItem alloc] initWithType:ItemTypeShippingTitle]; shippingTitle.text = GetShippingSectionTitle(_paymentRequest->shipping_type()); [model setHeader:shippingTitle @@ -276,13 +276,8 @@ CollectionViewItem* shippingOptionItem = nil; if (_paymentRequest->selected_shipping_option()) { - CollectionViewTextItem* selectedShippingOptionItem = - [[CollectionViewTextItem alloc] initWithType:ItemTypeShippingOption]; - selectedShippingOptionItem.textFont = [MDCTypography body2Font]; - selectedShippingOptionItem.textColor = [[MDCPalette greyPalette] tint900]; - selectedShippingOptionItem.detailTextFont = [MDCTypography body1Font]; - selectedShippingOptionItem.detailTextColor = - [[MDCPalette greyPalette] tint900]; + PaymentsTextItem* selectedShippingOptionItem = + [[PaymentsTextItem alloc] initWithType:ItemTypeShippingOption]; shippingOptionItem = selectedShippingOptionItem; _selectedShippingOptionItem = selectedShippingOptionItem; @@ -311,8 +306,8 @@ CollectionViewItem* paymentMethodItem = nil; if (_paymentRequest->selected_credit_card()) { - CollectionViewTextItem* paymentTitle = - [[CollectionViewTextItem alloc] initWithType:ItemTypePaymentTitle]; + PaymentsTextItem* paymentTitle = + [[PaymentsTextItem alloc] initWithType:ItemTypePaymentTitle]; paymentTitle.text = l10n_util::GetNSString(IDS_PAYMENT_REQUEST_PAYMENT_METHOD_SECTION_NAME); [model setHeader:paymentTitle @@ -345,8 +340,8 @@ CollectionViewItem* contactInfoItem = nil; if (_paymentRequest->selected_contact_profile()) { - CollectionViewTextItem* contactInfoTitle = - [[CollectionViewTextItem alloc] initWithType:ItemTypeContactInfoTitle]; + PaymentsTextItem* contactInfoTitle = + [[PaymentsTextItem alloc] initWithType:ItemTypeContactInfoTitle]; contactInfoTitle.text = l10n_util::GetNSString(IDS_PAYMENTS_CONTACT_DETAILS_LABEL); [model setHeader:contactInfoTitle @@ -471,7 +466,7 @@ item.phoneNumber = GetPhoneNumberLabelFromAutofillProfile(*profile); } -- (void)fillShippingOptionItem:(CollectionViewTextItem*)item +- (void)fillShippingOptionItem:(PaymentsTextItem*)item withOption:(web::PaymentShippingOption*)option { item.text = base::SysUTF16ToNSString(option->label); payments::CurrencyFormatter* currencyFormatter =
diff --git a/ios/chrome/browser/payments/payment_request_view_controller_unittest.mm b/ios/chrome/browser/payments/payment_request_view_controller_unittest.mm index d21ab3d..1e6b9a6 100644 --- a/ios/chrome/browser/payments/payment_request_view_controller_unittest.mm +++ b/ios/chrome/browser/payments/payment_request_view_controller_unittest.mm
@@ -14,12 +14,12 @@ #import "ios/chrome/browser/payments/cells/autofill_profile_item.h" #import "ios/chrome/browser/payments/cells/page_info_item.h" #import "ios/chrome/browser/payments/cells/payment_method_item.h" +#import "ios/chrome/browser/payments/cells/payments_text_item.h" #import "ios/chrome/browser/payments/cells/price_item.h" #include "ios/chrome/browser/payments/payment_request.h" #include "ios/chrome/browser/payments/payment_request_test_util.h" #import "ios/chrome/browser/ui/autofill/cells/status_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_detail_item.h" -#import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h" #import "ios/chrome/browser/ui/collection_view/collection_view_controller_test.h" #include "ios/chrome/grit/ios_strings.h" #include "ios/web/public/payments/payment_request.h" @@ -89,10 +89,10 @@ EXPECT_EQ(MDCCollectionViewCellAccessoryDisclosureIndicator, shipping_address_item.accessoryType); - // The next item should be of type CollectionViewTextItem. + // The next item should be of type PaymentsTextItem. item = GetCollectionViewItem(1, 1); - EXPECT_TRUE([item isMemberOfClass:[CollectionViewTextItem class]]); - CollectionViewTextItem* shipping_option_item = item; + EXPECT_TRUE([item isMemberOfClass:[PaymentsTextItem class]]); + PaymentsTextItem* shipping_option_item = item; EXPECT_EQ(MDCCollectionViewCellAccessoryDisclosureIndicator, shipping_option_item.accessoryType);
diff --git a/ios/chrome/browser/payments/shipping_address_selection_view_controller.mm b/ios/chrome/browser/payments/shipping_address_selection_view_controller.mm index 9591aadc..ef86e68 100644 --- a/ios/chrome/browser/payments/shipping_address_selection_view_controller.mm +++ b/ios/chrome/browser/payments/shipping_address_selection_view_controller.mm
@@ -19,7 +19,6 @@ #import "ios/chrome/browser/ui/autofill/cells/status_item.h" #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" -#import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h" #import "ios/chrome/browser/ui/collection_view/collection_view_model.h" #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" #import "ios/chrome/browser/ui/icons/chrome_icon.h" @@ -183,12 +182,6 @@ : [[MDCPalette greyPalette] tint600]; break; } - case ItemTypeAddShippingAddress: { - PaymentsTextCell* addAddressCell = - base::mac::ObjCCastStrict<PaymentsTextCell>(cell); - addAddressCell.textLabel.textColor = [[MDCPalette greyPalette] tint900]; - break; - } default: break; }
diff --git a/ios/chrome/browser/payments/shipping_option_selection_view_controller.mm b/ios/chrome/browser/payments/shipping_option_selection_view_controller.mm index 303212d..588dd8d2 100644 --- a/ios/chrome/browser/payments/shipping_option_selection_view_controller.mm +++ b/ios/chrome/browser/payments/shipping_option_selection_view_controller.mm
@@ -16,7 +16,6 @@ #import "ios/chrome/browser/ui/autofill/cells/status_item.h" #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" -#import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h" #import "ios/chrome/browser/ui/collection_view/collection_view_model.h" #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" #import "ios/chrome/browser/ui/icons/chrome_icon.h" @@ -59,7 +58,7 @@ PaymentRequest* _paymentRequest; // The currently selected item. May be nil. - CollectionViewTextItem* _selectedItem; + PaymentsTextItem* _selectedItem; } @end @@ -120,20 +119,14 @@ } for (const auto* shippingOption : _paymentRequest->shipping_options()) { - CollectionViewTextItem* item = - [[CollectionViewTextItem alloc] initWithType:ItemTypeShippingOption]; + PaymentsTextItem* item = + [[PaymentsTextItem alloc] initWithType:ItemTypeShippingOption]; item.text = base::SysUTF16ToNSString(shippingOption->label); payments::CurrencyFormatter* currencyFormatter = _paymentRequest->GetOrCreateCurrencyFormatter(); item.detailText = SysUTF16ToNSString(currencyFormatter->Format( base::UTF16ToASCII(shippingOption->amount.value))); - // Styling. - item.textFont = [MDCTypography body2Font]; - item.textColor = [[MDCPalette greyPalette] tint900]; - item.detailTextFont = [MDCTypography body1Font]; - item.detailTextColor = [[MDCPalette greyPalette] tint900]; - if (_paymentRequest->selected_shipping_option() == shippingOption) { item.accessoryType = MDCCollectionViewCellAccessoryCheckmark; _selectedItem = item; @@ -155,28 +148,6 @@ UIEdgeInsetsMake(0, kSeparatorEdgeInset, 0, kSeparatorEdgeInset); } -#pragma mark UICollectionViewDataSource - -- (UICollectionViewCell*)collectionView:(UICollectionView*)collectionView - cellForItemAtIndexPath:(nonnull NSIndexPath*)indexPath { - UICollectionViewCell* cell = - [super collectionView:collectionView cellForItemAtIndexPath:indexPath]; - - NSInteger itemType = - [self.collectionViewModel itemTypeForIndexPath:indexPath]; - switch (itemType) { - case ItemTypeMessage: { - PaymentsTextCell* messageCell = - base::mac::ObjCCastStrict<PaymentsTextCell>(cell); - messageCell.textLabel.textColor = [[MDCPalette cr_redPalette] tint600]; - break; - } - default: - break; - } - return cell; -} - #pragma mark UICollectionViewDelegate - (void)collectionView:(UICollectionView*)collectionView @@ -195,8 +166,8 @@ } // Update the newly selected cell. - CollectionViewTextItem* newlySelectedItem = - base::mac::ObjCCastStrict<CollectionViewTextItem>(item); + PaymentsTextItem* newlySelectedItem = + base::mac::ObjCCastStrict<PaymentsTextItem>(item); newlySelectedItem.accessoryType = MDCCollectionViewCellAccessoryCheckmark; [self reconfigureCellsForItems:@[ newlySelectedItem ] inSectionWithIdentifier:SectionIdentifierShippingOption];
diff --git a/ios/chrome/browser/payments/shipping_option_selection_view_controller_unittest.mm b/ios/chrome/browser/payments/shipping_option_selection_view_controller_unittest.mm index 0730117..aa808ca 100644 --- a/ios/chrome/browser/payments/shipping_option_selection_view_controller_unittest.mm +++ b/ios/chrome/browser/payments/shipping_option_selection_view_controller_unittest.mm
@@ -13,7 +13,6 @@ #include "ios/chrome/browser/payments/payment_request.h" #import "ios/chrome/browser/payments/payment_request_test_util.h" #import "ios/chrome/browser/ui/autofill/cells/status_item.h" -#import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h" #import "ios/chrome/browser/ui/collection_view/collection_view_controller_test.h" #include "ios/web/public/payments/payment_request.h" #include "testing/gtest/include/gtest/gtest.h" @@ -57,15 +56,15 @@ // One item for each of shipping options. ASSERT_EQ(2U, static_cast<unsigned int>(NumberOfItemsInSection(0))); - // The next two items should be of type CollectionViewTextItem. The first one + // The next two items should be of type PaymentsTextItem. The first one // should appear to be selected. id item = GetCollectionViewItem(0, 0); - EXPECT_TRUE([item isMemberOfClass:[CollectionViewTextItem class]]); - CollectionViewTextItem* text_item = item; + EXPECT_TRUE([item isMemberOfClass:[PaymentsTextItem class]]); + PaymentsTextItem* text_item = item; EXPECT_EQ(MDCCollectionViewCellAccessoryCheckmark, text_item.accessoryType); item = GetCollectionViewItem(0, 1); - EXPECT_TRUE([item isMemberOfClass:[CollectionViewTextItem class]]); + EXPECT_TRUE([item isMemberOfClass:[PaymentsTextItem class]]); text_item = item; EXPECT_EQ(MDCCollectionViewCellAccessoryNone, text_item.accessoryType);
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm index f6f011d..a574e6c 100644 --- a/ios/chrome/browser/tabs/tab.mm +++ b/ios/chrome/browser/tabs/tab.mm
@@ -1377,6 +1377,9 @@ } - (void)reloadWithUserAgentType:(web::UserAgentType)userAgentType { + // This removes the web view, which will be recreated at the end of this. + [self.webController requirePageReconstruction]; + // TODO(crbug.com/228171): A hack in session_controller -addPendingItem // discusses making tab responsible for distinguishing history stack // navigation from new navigations.
diff --git a/ios/web/web_state/ui/crw_web_controller.h b/ios/web/web_state/ui/crw_web_controller.h index 0b227410..b770627 100644 --- a/ios/web/web_state/ui/crw_web_controller.h +++ b/ios/web/web_state/ui/crw_web_controller.h
@@ -191,6 +191,14 @@ // Dismisses the soft keyboard. - (void)dismissKeyboard; +// Requires that the next load rebuild the UIWebView. This is expensive, and +// should be used only in the case where something has changed that UIWebView +// only checks on creation, such that the whole object needs to be rebuilt. +// TODO(stuartmorgan): Merge this and reinitializeWebViewAndReload:. They are +// currently subtly different in terms of implementation, but are for +// fundamentally the same purpose. +- (void)requirePageReconstruction; + - (void)reinitializeWebViewAndReload:(BOOL)reload; // Requires that the next display reload the page, using a placeholder while
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm index a11db2c..495820f1 100644 --- a/ios/web/web_state/ui/crw_web_controller.mm +++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -476,10 +476,8 @@ // Returns YES if the user interacted with the page recently. @property(nonatomic, readonly) BOOL userClickedRecently; -// User agent type of the transient item if any, the pending item if a -// navigation is in progress or the last committed item otherwise. -// Returns MOBILE, the default type, if navigation manager is nullptr or empty. -@property(nonatomic, readonly) web::UserAgentType userAgentType; +// Whether or not desktop user agent is used for the currentItem. +@property(nonatomic, readonly) BOOL usesDesktopUserAgent; // Facade for Mojo API. @property(nonatomic, readonly) web::MojoFacade* mojoFacade; @@ -496,18 +494,10 @@ // unless the request was a POST. @property(nonatomic, readonly) NSDictionary* currentHTTPHeaders; -// Updates web view's user agent according to |userAgentType|. It is no-op if -// |userAgentType| is NONE. -- (void)updateWebViewUserAgentFromUserAgentType: - (web::UserAgentType)userAgentType; - -// Requires that the next load rebuild the web view. This is expensive, and -// should be used only in the case where something has changed that web view -// only checks on creation, such that the whole object needs to be rebuilt. -// TODO(stuartmorgan): Merge this and reinitializeWebViewAndReload:. They are -// currently subtly different in terms of implementation, but are for -// fundamentally the same purpose. -- (void)requirePageReconstruction; +// Requires page reconstruction if |item| has a non-NONE UserAgentType and it +// differs from that of |fromItem|. +- (void)updateDesktopUserAgentForItem:(web::NavigationItem*)item + previousUserAgentType:(web::UserAgentType)userAgentType; // Removes the container view from the hierarchy and resets the ivar. - (void)resetContainerView; @@ -1646,13 +1636,6 @@ [self ensureWebViewCreated]; - // Update web view's user agent is called for every load, which may have - // performance implications because update web view's user agent may - // potentially send a message to a separate thread. However, this is not an - // issue for WKWebView because WKWebView's |setCustomUserAgent| is non-op if - // user agent stays thesame. - [self updateWebViewUserAgentFromUserAgentType:self.userAgentType]; - [self loadRequestForCurrentNavigationItem]; } @@ -2063,11 +2046,15 @@ // Update the user agent before attempting the navigation. web::NavigationItem* toItem = items[index].get(); - [self updateWebViewUserAgentFromUserAgentType:toItem->GetUserAgentType()]; + web::NavigationItem* previousItem = sessionController.currentItem; + web::UserAgentType previousUserAgentType = + previousItem ? previousItem->GetUserAgentType() + : web::UserAgentType::NONE; + [self updateDesktopUserAgentForItem:toItem + previousUserAgentType:previousUserAgentType]; - web::NavigationItem* fromItem = sessionController.currentItem; BOOL sameDocumentNavigation = - [sessionController isSameDocumentNavigationBetweenItem:fromItem + [sessionController isSameDocumentNavigationBetweenItem:previousItem andItem:toItem]; if (sameDocumentNavigation) { [sessionController goToItemAtIndex:index]; @@ -2222,9 +2209,9 @@ return rendererInitiatedWithoutInteraction || noNavigationItems; } -- (web::UserAgentType)userAgentType { +- (BOOL)usesDesktopUserAgent { web::NavigationItem* item = self.currentNavItem; - return item ? item->GetUserAgentType() : web::UserAgentType::MOBILE; + return item && item->GetUserAgentType() == web::UserAgentType::DESKTOP; } - (web::MojoFacade*)mojoFacade { @@ -2263,14 +2250,15 @@ return _passKitDownloader.get(); } -- (void)updateWebViewUserAgentFromUserAgentType: - (web::UserAgentType)userAgentType { - if (userAgentType == web::UserAgentType::NONE) +- (void)updateDesktopUserAgentForItem:(web::NavigationItem*)item + previousUserAgentType:(web::UserAgentType)userAgentType { + if (!item) return; - - NSString* userAgent = - base::SysUTF8ToNSString(web::GetWebClient()->GetUserAgent(userAgentType)); - [_webView setCustomUserAgent:userAgent]; + web::UserAgentType itemUserAgentType = item->GetUserAgentType(); + if (itemUserAgentType == web::UserAgentType::NONE) + return; + if (itemUserAgentType != userAgentType) + [self requirePageReconstruction]; } #pragma mark - @@ -4067,7 +4055,7 @@ // delegate must be specified. return web::BuildWKWebView(CGRectZero, config, self.webStateImpl->GetBrowserState(), - self.userAgentType); + self.usesDesktopUserAgent); } - (void)setWebView:(WKWebView*)webView {
diff --git a/ios/web/web_state/web_view_internal_creation_util.h b/ios/web/web_state/web_view_internal_creation_util.h index 38226bf..68e8912 100644 --- a/ios/web/web_state/web_view_internal_creation_util.h +++ b/ios/web/web_state/web_view_internal_creation_util.h
@@ -8,8 +8,6 @@ #import <CoreGraphics/CoreGraphics.h> #import <WebKit/WebKit.h> -#include "ios/web/public/user_agent.h" - @protocol CRWContextMenuDelegate; // This file is a collection of functions that vend web views. @@ -28,7 +26,7 @@ WKWebView* BuildWKWebView(CGRect frame, WKWebViewConfiguration* configuration, BrowserState* browser_state, - UserAgentType user_agent_type, + BOOL use_desktop_user_agent, id<CRWContextMenuDelegate> context_menu_delegate); // Creates and returns a new WKWebView for displaying regular web content. @@ -37,7 +35,7 @@ WKWebView* BuildWKWebView(CGRect frame, WKWebViewConfiguration* configuration, BrowserState* browser_state, - UserAgentType user_agent_type); + BOOL use_desktop_user_agent); // Creates and returns a new WKWebView for displaying regular web content. // The preconditions for the creation of a WKWebView are the same as the
diff --git a/ios/web/web_state/web_view_internal_creation_util.mm b/ios/web/web_state/web_view_internal_creation_util.mm index 7c9fc45..c13b8b7 100644 --- a/ios/web/web_state/web_view_internal_creation_util.mm +++ b/ios/web/web_state/web_view_internal_creation_util.mm
@@ -36,7 +36,7 @@ WKWebView* BuildWKWebView(CGRect frame, WKWebViewConfiguration* configuration, BrowserState* browser_state, - UserAgentType user_agent_type, + BOOL use_desktop_user_agent, id<CRWContextMenuDelegate> context_menu_delegate) { VerifyWKWebViewCreationPreConditions(browser_state, configuration); @@ -44,6 +44,9 @@ WKWebView* web_view = [[WKWebView alloc] initWithFrame:frame configuration:configuration]; + // Set the user agent. + UserAgentType user_agent_type = + use_desktop_user_agent ? UserAgentType::DESKTOP : UserAgentType::MOBILE; web_view.customUserAgent = base::SysUTF8ToNSString( web::GetWebClient()->GetUserAgent(user_agent_type)); @@ -74,16 +77,17 @@ WKWebView* BuildWKWebView(CGRect frame, WKWebViewConfiguration* configuration, BrowserState* browser_state, - UserAgentType user_agent_type) { - return BuildWKWebView(frame, configuration, browser_state, user_agent_type, - nil); + BOOL use_desktop_user_agent) { + return BuildWKWebView(frame, configuration, browser_state, + use_desktop_user_agent, nil); } WKWebView* BuildWKWebView(CGRect frame, WKWebViewConfiguration* configuration, BrowserState* browser_state) { + BOOL use_desktop_user_agent = NO; return BuildWKWebView(frame, configuration, browser_state, - UserAgentType::MOBILE); + use_desktop_user_agent); } } // namespace web
diff --git a/ios/web/web_view_creation_util.mm b/ios/web/web_view_creation_util.mm index 0edd5c4..d3023e06 100644 --- a/ios/web/web_view_creation_util.mm +++ b/ios/web/web_view_creation_util.mm
@@ -5,7 +5,6 @@ #import "ios/web/public/web_view_creation_util.h" #include "base/logging.h" -#include "ios/web/public/user_agent.h" #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h" #import "ios/web/web_state/web_view_internal_creation_util.h" @@ -28,8 +27,7 @@ WKWebViewConfigurationProvider& config_provider = WKWebViewConfigurationProvider::FromBrowserState(browser_state); return BuildWKWebView(frame, config_provider.GetWebViewConfiguration(), - browser_state, UserAgentType::MOBILE, - context_menu_delegate); + browser_state, NO, context_menu_delegate); } } // namespace web
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index fdb88fa..95866f0 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -2733,8 +2733,7 @@ crbug.com/685951 css2.1/t040304-c64-uri-00-a-g.html [ Failure Pass ] -# Rebaseline after https://skia-review.googlesource.com/c/11400/ rolls into Chromium. -crbug.com/706792 [ Win ] fast/text/ellipsis-platform-font-change.html [ NeedsManualRebaseline ] +crbug.com/706792 [ Win ] fast/text/ellipsis-platform-font-change.html [ NeedsRebaseline ] # Importing 'fetch' tests from WPT. crbug.com/705490 external/wpt/fetch/api/basic/error-after-response.html [ Timeout Pass ]
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/xss-DENIED-window-name-navigator-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/xss-DENIED-window-name-navigator-expected.txt index 1b8409a..b662d55 100644 --- a/third_party/WebKit/LayoutTests/http/tests/security/xss-DENIED-window-name-navigator-expected.txt +++ b/third_party/WebKit/LayoutTests/http/tests/security/xss-DENIED-window-name-navigator-expected.txt
@@ -1,4 +1,4 @@ CONSOLE MESSAGE: line 6: iframe1: SecurityError: Blocked a frame with origin "null" from accessing a cross-origin frame. -CONSOLE MESSAGE: line 14: iframe1: SecurityError: Blocked a frame with origin "null" from accessing a cross-origin frame. -CONSOLE MESSAGE: line 6: iframe2: SecurityError: Blocked a frame with origin "null" from accessing a cross-origin frame. +CONSOLE MESSAGE: line 12: FAIL +CONSOLE MESSAGE: line 4: FAIL
diff --git a/third_party/WebKit/LayoutTests/payments/resources/payment-request-mock.js b/third_party/WebKit/LayoutTests/payments/resources/payment-request-mock.js index dce8a0a..a50b8dd0 100644 --- a/third_party/WebKit/LayoutTests/payments/resources/payment-request-mock.js +++ b/third_party/WebKit/LayoutTests/payments/resources/payment-request-mock.js
@@ -6,7 +6,7 @@ let paymentRequestMock = loadMojoModules( 'paymentRequestMock', - ['components/payments/content/payment_request.mojom', + ['components/payments/mojom/payment_request.mojom', 'mojo/public/js/bindings', ]).then(mojo => { let [paymentRequest, bindings] = mojo.modules;
diff --git a/third_party/WebKit/Source/modules/BUILD.gn b/third_party/WebKit/Source/modules/BUILD.gn index 15fa267..e42ddf0 100644 --- a/third_party/WebKit/Source/modules/BUILD.gn +++ b/third_party/WebKit/Source/modules/BUILD.gn
@@ -322,7 +322,7 @@ deps = [ ":modules", ":modules_testing", - "//components/payments/content:mojom_blink", + "//components/payments/mojom:mojom_blink", "//skia", "//testing/gmock", "//testing/gtest",
diff --git a/third_party/WebKit/Source/modules/payments/BUILD.gn b/third_party/WebKit/Source/modules/payments/BUILD.gn index 7379385..09cdb69 100644 --- a/third_party/WebKit/Source/modules/payments/BUILD.gn +++ b/third_party/WebKit/Source/modules/payments/BUILD.gn
@@ -35,7 +35,7 @@ "PaymentsValidators.h", ] deps = [ - "//components/payments/content:mojom_blink", - "//components/payments/content:mojom_payment_app_blink", + "//components/payments/mojom:mojom_blink", + "//components/payments/mojom:mojom_payment_app_blink", ] }
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAddress.h b/third_party/WebKit/Source/modules/payments/PaymentAddress.h index 805e0ba..01f06b37 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentAddress.h +++ b/third_party/WebKit/Source/modules/payments/PaymentAddress.h
@@ -7,7 +7,7 @@ #include "bindings/core/v8/ScriptValue.h" #include "bindings/core/v8/ScriptWrappable.h" -#include "components/payments/content/payment_request.mojom-blink.h" +#include "components/payments/mojom/payment_request.mojom-blink.h" #include "modules/ModulesExport.h" #include "platform/heap/Handle.h" #include "platform/wtf/Noncopyable.h"
diff --git a/third_party/WebKit/Source/modules/payments/PaymentManager.h b/third_party/WebKit/Source/modules/payments/PaymentManager.h index 207ad86e..b20a1ff 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentManager.h +++ b/third_party/WebKit/Source/modules/payments/PaymentManager.h
@@ -7,7 +7,7 @@ #include "bindings/core/v8/ScriptPromise.h" #include "bindings/core/v8/ScriptWrappable.h" -#include "components/payments/content/payment_app.mojom-blink.h" +#include "components/payments/mojom/payment_app.mojom-blink.h" #include "modules/ModulesExport.h" #include "platform/heap/Handle.h"
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.h b/third_party/WebKit/Source/modules/payments/PaymentRequest.h index 63022dc..f3c1319 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.h +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
@@ -8,7 +8,7 @@ #include "bindings/core/v8/ScriptPromise.h" #include "bindings/core/v8/ScriptValue.h" #include "bindings/core/v8/ScriptWrappable.h" -#include "components/payments/content/payment_request.mojom-blink.h" +#include "components/payments/mojom/payment_request.mojom-blink.h" #include "core/dom/ContextLifecycleObserver.h" #include "core/events/EventTarget.h" #include "modules/ModulesExport.h"
diff --git a/third_party/WebKit/Source/modules/payments/PaymentResponse.h b/third_party/WebKit/Source/modules/payments/PaymentResponse.h index f6de224..f3a713f 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentResponse.h +++ b/third_party/WebKit/Source/modules/payments/PaymentResponse.h
@@ -8,7 +8,7 @@ #include "bindings/core/v8/ScriptPromise.h" #include "bindings/core/v8/ScriptValue.h" #include "bindings/core/v8/ScriptWrappable.h" -#include "components/payments/content/payment_request.mojom-blink.h" +#include "components/payments/mojom/payment_request.mojom-blink.h" #include "modules/ModulesExport.h" #include "modules/payments/PaymentCurrencyAmount.h" #include "platform/heap/Handle.h"
diff --git a/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h b/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h index 9d9d7aa..19683ee 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h +++ b/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h
@@ -7,7 +7,7 @@ #include "bindings/core/v8/ScriptFunction.h" #include "bindings/core/v8/V8DOMException.h" -#include "components/payments/content/payment_request.mojom-blink.h" +#include "components/payments/mojom/payment_request.mojom-blink.h" #include "modules/payments/PaymentDetailsInit.h" #include "modules/payments/PaymentDetailsUpdate.h" #include "modules/payments/PaymentItem.h"
diff --git a/third_party/WebKit/Source/modules/payments/PaymentsValidators.h b/third_party/WebKit/Source/modules/payments/PaymentsValidators.h index 177fde0..c391a1e 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentsValidators.h +++ b/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
@@ -5,7 +5,7 @@ #ifndef PaymentsValidators_h #define PaymentsValidators_h -#include "components/payments/content/payment_request.mojom-blink.h" +#include "components/payments/mojom/payment_request.mojom-blink.h" #include "modules/ModulesExport.h" #include "platform/wtf/Allocator.h" #include "platform/wtf/text/WTFString.h"
diff --git a/third_party/WebKit/public/BUILD.gn b/third_party/WebKit/public/BUILD.gn index d54758b..5c99374 100644 --- a/third_party/WebKit/public/BUILD.gn +++ b/third_party/WebKit/public/BUILD.gn
@@ -754,7 +754,7 @@ "platform/modules/webshare/webshare.mojom", ] public_deps = [ - "//components/payments/content:mojom", + "//components/payments/mojom", "//url/mojo:url_mojom_gurl", ]
diff --git a/ui/arc/notification/arc_custom_notification_view.cc b/ui/arc/notification/arc_custom_notification_view.cc index d0c92d9..8afd6fb 100644 --- a/ui/arc/notification/arc_custom_notification_view.cc +++ b/ui/arc/notification/arc_custom_notification_view.cc
@@ -534,6 +534,11 @@ } void ArcCustomNotificationView::OnBlur() { + if (!parent()) { + // OnBlur may be called when this view is being removed. + return; + } + CHECK_EQ(message_center::CustomNotificationView::kViewClassName, parent()->GetClassName());