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

Unified Diff: chrome/renderer/render_view.cc

Issue 56122: Callbacks through ChromeClient->RenderView->RenderViewHost for ContentsDidCha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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/renderer/render_view.h ('k') | webkit/glue/chrome_client_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 13128)
+++ chrome/renderer/render_view.cc (working copy)
@@ -1944,6 +1944,19 @@
Send(new ViewHostMsg_OpenURL(routing_id_, url, referrer, disposition));
}
+void RenderView::DidContentsSizeChange(WebWidget* webwidget,
+ int new_width,
+ int new_height) {
+ // TODO(rafaelw): This is a temporary solution. Only the ExtensionView wants
+ // this notification at the moment. It isn't clean to test for ExtensionView
+ // by examining the enabled_bindings. This needs to be generalized as it
+ // becomes clear what extension toolbars need.
+ if (BindingsPolicy::is_extension_enabled(enabled_bindings_)) {
+ int width = webview()->GetMainFrame()->GetContentsPreferredWidth();
+ Send(new ViewHostMsg_DidContentsPreferredWidthChange(routing_id_, width));
+ }
+}
+
// We are supposed to get a single call to Show for a newly created RenderView
// that was created via RenderView::CreateWebView. So, we wait until this
// point to dispatch the ShowView message.
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/glue/chrome_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698