|
@@ -1173,6 +1173,11 @@ void WebContents::DidStartLoading() {
|
|
|
|
|
|
void WebContents::DidStopLoading() {
|
|
|
Emit("did-stop-loading");
|
|
|
+
|
|
|
+ auto* web_preferences = WebContentsPreferences::From(web_contents());
|
|
|
+ if (web_preferences &&
|
|
|
+ web_preferences->IsEnabled(options::kEnablePreferredSizeMode))
|
|
|
+ web_contents()->GetRenderViewHost()->EnablePreferredSizeMode();
|
|
|
}
|
|
|
|
|
|
bool WebContents::EmitNavigationEvent(
|
|
@@ -2903,6 +2908,11 @@ v8::Local<v8::Promise> WebContents::TakeHeapSnapshot(
|
|
|
return handle;
|
|
|
}
|
|
|
|
|
|
+void WebContents::UpdatePreferredSize(content::WebContents* web_contents,
|
|
|
+ const gfx::Size& pref_size) {
|
|
|
+ Emit("preferred-size-changed", pref_size);
|
|
|
+}
|
|
|
+
|
|
|
// static
|
|
|
v8::Local<v8::ObjectTemplate> WebContents::FillObjectTemplate(
|
|
|
v8::Isolate* isolate,
|