Index: ios/web_view/internal/web_view_web_main_parts.mm |
diff --git a/ios/web_view/internal/web_view_web_main_parts.mm b/ios/web_view/internal/web_view_web_main_parts.mm |
index 3b98e727ea3b3158e56dad1ff8d6816445319788..651d35766b3d5e93b8bd3e1174de9e1dcce2a538 100644 |
--- a/ios/web_view/internal/web_view_web_main_parts.mm |
+++ b/ios/web_view/internal/web_view_web_main_parts.mm |
@@ -4,12 +4,16 @@ |
#import "ios/web_view/internal/web_view_web_main_parts.h" |
+#import <Foundation/Foundation.h> |
+ |
#include "base/base_paths.h" |
+#import "base/mac/bundle_locations.h" |
#include "base/memory/ptr_util.h" |
#include "base/path_service.h" |
#include "components/translate/core/browser/translate_download_manager.h" |
#include "ios/web_view/internal/web_view_browser_state.h" |
#import "ios/web_view/public/cwv_delegate.h" |
+#import "ios/web_view/public/cwv_web_view.h" |
#include "ui/base/l10n/l10n_util_mac.h" |
#include "ui/base/resource/resource_bundle.h" |
@@ -26,6 +30,9 @@ WebViewWebMainParts::WebViewWebMainParts(id<CWVDelegate> delegate) { |
WebViewWebMainParts::~WebViewWebMainParts() = default; |
void WebViewWebMainParts::PreMainMessageLoopRun() { |
+ base::mac::SetOverrideFrameworkBundle( |
+ [NSBundle bundleForClass:[CWVWebView class]]); |
+ |
// Initialize resources. |
l10n_util::OverrideLocaleWithCocoaLocale(); |
ui::ResourceBundle::InitSharedInstanceWithLocale( |