Handle the ViewHostMsg_RunFileChooser and ViewHostMsg_EnumerateDirectory IPC messages which are sent
by content(renderer) via the TabContentsDelegate. We eventually want to get rid of the pattern of sending
IPC messages from content and handling them in chrome and vice versa. 

BUG=87335
Review URL: http://codereview.chromium.org/7721003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98081 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 2c4a4a3..0caced4e1 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -294,6 +294,8 @@
     IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits)
     IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
     IPC_MESSAGE_HANDLER(ViewHostMsg_SaveURLAs, OnSaveURL)
+    IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
+    IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory)
     IPC_MESSAGE_UNHANDLED(handled = false)
   IPC_END_MESSAGE_MAP_EX()
 
@@ -1093,6 +1095,16 @@
       Details<const bool>(&is_editable_node));
 }
 
+void TabContents::OnRunFileChooser(
+    const ViewHostMsg_RunFileChooser_Params& params) {
+  delegate()->RunFileChooser(this, params);
+}
+
+void TabContents::OnEnumerateDirectory(int request_id,
+                                       const FilePath& path) {
+  delegate()->EnumerateDirectory(this, request_id, path);
+}
+
 // Notifies the RenderWidgetHost instance about the fact that the page is
 // loading, or done loading and calls the base implementation.
 void TabContents::SetIsLoading(bool is_loading,