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

Unified Diff: chrome/browser/extensions/extension_host.cc

Issue 7729002: Handle the ViewHostMsg_RunFileChooser IPC message which is sent by content(renderer) in RVH and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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.h ('k') | content/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_host.cc
===================================================================
--- chrome/browser/extensions/extension_host.cc (revision 98116)
+++ chrome/browser/extensions/extension_host.cc (working copy)
@@ -583,6 +583,17 @@
void ExtensionHost::HandleMouseActivate() {
}
+void ExtensionHost::RunFileChooser(
+ RenderViewHost* render_view_host,
+ const ViewHostMsg_RunFileChooser_Params& params) {
+ // This object is destroyed when the file selection is performed or
+ // cancelled.
+ FileSelectHelper* file_select_helper = new FileSelectHelper(profile());
+ file_select_helper->RunFileChooser(render_view_host,
+ GetAssociatedTabContents(),
+ params);
+}
+
void ExtensionHost::CreateNewWindow(
int route_id,
const ViewHostMsg_CreateWindow_Params& params) {
@@ -763,7 +774,6 @@
bool ExtensionHost::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ExtensionHost, message)
- IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -789,11 +799,3 @@
kPreferredSizeWidth | kPreferredSizeHeightThisIsSlow));
}
}
-
-void ExtensionHost::OnRunFileChooser(
- const ViewHostMsg_RunFileChooser_Params& params) {
- if (file_select_helper_.get() == NULL)
- file_select_helper_.reset(new FileSelectHelper(profile()));
- file_select_helper_->RunFileChooser(render_view_host_,
- GetAssociatedTabContents(), params);
-}
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | content/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698