diff options
author | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-04 01:28:18 +0000 |
---|---|---|
committer | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-04 01:28:18 +0000 |
commit | 4bea86d44d7ada7ecc43695df42010c59e28b32a (patch) | |
tree | 5eb376ed385f544bb7d7557fba6c6e6b48f12806 /chrome/browser/ui | |
parent | 6609204d581a06fa64427355452cd369b4570cff (diff) | |
download | chromium_src-4bea86d44d7ada7ecc43695df42010c59e28b32a.zip chromium_src-4bea86d44d7ada7ecc43695df42010c59e28b32a.tar.gz chromium_src-4bea86d44d7ada7ecc43695df42010c59e28b32a.tar.bz2 |
Force a CSS min-width for inline web intents.
R=mihaip@chromium.org,gbillock@chromium.org
BUG=145637
Review URL: https://chromiumcodereview.appspot.com/11029008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r-- | chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc | 6 | ||||
-rw-r--r-- | chrome/browser/ui/intents/web_intent_inline_disposition_delegate.h | 4 |
2 files changed, 10 insertions, 0 deletions
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 4637ebc..ba08bea 100644 --- a/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc +++ b/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc @@ -95,6 +95,12 @@ void WebIntentInlineDispositionDelegate::RenderViewCreated( render_view_host->EnableAutoResize( picker_->GetMinInlineDispositionSize(), picker_->GetMaxInlineDispositionSize()); + render_view_host_ = render_view_host; +} + +void WebIntentInlineDispositionDelegate::DocumentAvailableInMainFrame() { + std::string css = "body { min-width:400px; }"; + render_view_host_->InsertCSS(string16(), css); } content::WebContents* WebIntentInlineDispositionDelegate:: diff --git a/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.h b/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.h index f118aba..08a8be6 100644 --- a/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.h +++ b/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.h @@ -53,6 +53,7 @@ class WebIntentInlineDispositionDelegate virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; virtual void RenderViewCreated( content::RenderViewHost* render_view_host) OVERRIDE; + virtual void DocumentAvailableInMainFrame() OVERRIDE; // ExtensionFunctionDispatcher::Delegate virtual extensions::WindowController* GetExtensionWindowController() @@ -70,6 +71,9 @@ class WebIntentInlineDispositionDelegate Browser* browser_; // Weak pointer. + // The RVH responsible for the RenderView. Weak pointer. + content::RenderViewHost* render_view_host_; + // Dispatch handler for extension APIs. ExtensionFunctionDispatcher extension_function_dispatcher_; }; |