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

Unified Diff: chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc

Issue 10411010: [Gtk, WebIntents] Support autosizing of inline content. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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: chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc
diff --git a/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc b/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc
index 6e4d68b9925ac56f916c2dfe1990cec372a75ce2..6b1e2f0b509a64f7081bb6144eccff5dcde00708 100644
--- a/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc
+++ b/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/ui/intents/web_intent_picker.h"
#include "chrome/common/extensions/extension_messages.h"
#include "content/public/browser/navigation_controller.h"
+#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/renderer_preferences.h"
#include "ipc/ipc_message_macros.h"
@@ -73,6 +74,13 @@ bool WebIntentInlineDispositionDelegate::OnMessageReceived(
IPC_END_MESSAGE_MAP()
return handled;
}
+void WebIntentInlineDispositionDelegate::RenderViewCreated(
+ content::RenderViewHost* render_view_host) {
+ DCHECK(render_view_host);
+ render_view_host->EnableAutoResize(
+ WebIntentPicker::GetMinInlineDispositionSize(),
+ WebIntentPicker::GetMaxInlineDispositionSize());
+}
content::WebContents* WebIntentInlineDispositionDelegate::
GetAssociatedWebContents() const {
@@ -89,3 +97,8 @@ void WebIntentInlineDispositionDelegate::OnRequest(
extension_function_dispatcher_.Dispatch(params,
web_contents_->GetRenderViewHost());
}
+void WebIntentInlineDispositionDelegate::ResizeDueToAutoResize(
+ content::WebContents* source, const gfx::Size& pref_size) {
+ DCHECK(picker_);
+ picker_->OnInlineDispositionAutoResize(pref_size);
+}

Powered by Google App Engine
This is Rietveld 408576698