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

Unified Diff: ios/web_view/internal/web_view_web_main_delegate.mm

Issue 2980983002: Use dummy class to locate NSBundle. (Closed)
Patch Set: Created 3 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/internal/web_view_web_main_delegate.mm
diff --git a/ios/web_view/internal/web_view_web_main_delegate.mm b/ios/web_view/internal/web_view_web_main_delegate.mm
index 40b0be9e71647e1a4f2ad7e29f43c18fe62b85f1..4e2454e018df6fabaeee91e52712735ac0b76b2d 100644
--- a/ios/web_view/internal/web_view_web_main_delegate.mm
+++ b/ios/web_view/internal/web_view_web_main_delegate.mm
@@ -5,12 +5,18 @@
#import "ios/web_view/internal/web_view_web_main_delegate.h"
#import "base/mac/bundle_locations.h"
-#import "ios/web_view/public/cwv_html_element.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
+// Dummy class used to locate the containing NSBundle.
+@interface CWVBundleLocator : NSObject
+@end
+
+@implementation CWVBundleLocator
+@end
+
namespace ios_web_view {
WebViewWebMainDelegate::WebViewWebMainDelegate() {}
@@ -18,11 +24,8 @@ WebViewWebMainDelegate::WebViewWebMainDelegate() {}
WebViewWebMainDelegate::~WebViewWebMainDelegate() = default;
void WebViewWebMainDelegate::BasicStartupComplete() {
- // Use CWVHTMLElement instead of CWVWebView and CWVWebViewConfiguration
- // because the latter two classes' +intialize calls in to this method and may
- // cause a deadlock.
base::mac::SetOverrideFrameworkBundle(
- [NSBundle bundleForClass:[CWVHTMLElement class]]);
+ [NSBundle bundleForClass:[CWVBundleLocator class]]);
}
} // namespace ios_web_view
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698