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

Unified Diff: chrome/renderer/render_view.h

Issue 556058: Quick hack to make popup shrinkage work again (Closed)
Patch Set: Only run timer on extension views Created 10 years, 11 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 | « chrome/browser/extensions/extension_host.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.h
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index 28456012d43e2b52c06c43c4f36d2079ce0fb61f..266163fafae4ea1faf13412e7839fb5e4cea212d 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -723,6 +723,10 @@ class RenderView : public RenderWidget,
void DidDownloadImage(webkit_glue::ImageResourceFetcher* fetcher,
const SkBitmap& image);
+ // Check whether the preferred size has changed. This is called periodically
+ // by preferred_size_change_timer_.
+ void CheckPreferredSize();
+
enum ErrorPageType {
DNS_ERROR,
HTTP_404,
@@ -957,6 +961,11 @@ class RenderView : public RenderWidget,
// If true, we send IPC messages when |preferred_size_| changes.
bool send_preferred_size_changes_;
+ // Nasty hack. WebKit does not send us events when the preferred size changes,
+ // so we must poll it. See also:
+ // https://bugs.webkit.org/show_bug.cgi?id=32807.
+ base::RepeatingTimer<RenderView> preferred_size_change_timer_;
+
// The text selection the last time DidChangeSelection got called.
std::string last_selection_;
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698