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

Unified Diff: components/plugins/renderer/loadable_plugin_placeholder.cc

Issue 1764043002: Update a webview plugin's WebView's lifecycle immediately after resizing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: components/plugins/renderer/loadable_plugin_placeholder.cc
diff --git a/components/plugins/renderer/loadable_plugin_placeholder.cc b/components/plugins/renderer/loadable_plugin_placeholder.cc
index f28c19638b980491014f7c72e410f0150bc2ad3b..b4fcb7ed110617dd310c2cccf55203b1fcfded10 100644
--- a/components/plugins/renderer/loadable_plugin_placeholder.cc
+++ b/components/plugins/renderer/loadable_plugin_placeholder.cc
@@ -35,11 +35,6 @@ using content::RenderThread;
namespace plugins {
-// TODO(tommycli): After a size update, re-check the size after this delay, as
-// Blink can report incorrect sizes to plugins while the compositing state is
-// dirty. Chosen because it seems to work.
-const int kSizeChangeRecheckDelayMilliseconds = 100;
chrishtr 2016/03/04 05:22:09 Strictly speaking, the change to this file has to
-
void LoadablePluginPlaceholder::BlockForPowerSaverPoster() {
DCHECK(!is_blocked_for_power_saver_poster_);
is_blocked_for_power_saver_poster_ = true;
@@ -200,16 +195,7 @@ void LoadablePluginPlaceholder::OnUnobscuredRectUpdate(
return;
}
- if (!size_update_timer_.IsRunning()) {
- // TODO(tommycli): We have to post a delayed task to recheck the size, as
- // Blink can report wrong sizes for partially obscured plugins while the
- // compositing state is dirty. https://crbug.com/343769
- size_update_timer_.Start(
- FROM_HERE,
- base::TimeDelta::FromMilliseconds(kSizeChangeRecheckDelayMilliseconds),
- base::Bind(&LoadablePluginPlaceholder::RecheckSizeAndMaybeUnthrottle,
- weak_factory_.GetWeakPtr()));
- }
+ RecheckSizeAndMaybeUnthrottle();
}
void LoadablePluginPlaceholder::WasShown() {

Powered by Google App Engine
This is Rietveld 408576698