Initial landing of file_manager component extension (not yet enabled)

This is the initial landing of a component extension to handle file open, save-as, and file management user interfaces.  This is just the basic plumbing, minus any useful functionality.

I've tested this by building with...
$ export GYP_DEFINES='file_manager_extension=1'
$ make chrome -j16

Then launch the result and visit chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/main.html, and verify that the <h1> tab is blue, and the document contains "Hello World".

BUG=chromium-os:11988
TEST=

Review URL: http://codereview.chromium.org/6588053

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76408 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
index d526a2f..883f554 100644
--- a/chrome/browser/browser_resources.grd
+++ b/chrome/browser/browser_resources.grd
@@ -26,6 +26,7 @@
       <include name="IDR_ABOUT_STATS_HTML" file="resources\about_stats.html" flattenhtml="true" type="BINDATA" />
       <include name="IDR_ABOUT_VERSION_HTML" file="resources\about_version.html" flattenhtml="true" type="BINDATA" />
       <include name="IDR_BOOKMARKS_MANIFEST" file="resources\bookmark_manager\manifest.json" type="BINDATA" />
+      <include name="IDR_FILEMANAGER_MANIFEST" file="resources\file_manager\manifest.json" type="BINDATA" />
       <include name="IDR_CRASHES_HTML" file="resources\crashes.html" flattenhtml="true" type="BINDATA" />
       <include name="IDR_CREDITS_HTML" file="resources\about_credits.html" flattenhtml="true" type="BINDATA" />
       <include name="IDR_DOWNLOADS_HTML" file="resources\downloads.html" flattenhtml="true" type="BINDATA" />
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index d80ef44..f49f5681 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -406,6 +406,12 @@
       FILE_PATH_LITERAL("bookmark_manager"),
       IDR_BOOKMARKS_MANIFEST));
 
+#if defined(FILE_MANAGER_EXTENSION)
+  component_extensions.push_back(std::make_pair(
+      FILE_PATH_LITERAL("file_manager"),
+      IDR_FILEMANAGER_MANIFEST));
+#endif
+
 #if defined(TOUCH_UI)
   component_extensions.push_back(std::make_pair(
       FILE_PATH_LITERAL("keyboard"),
diff --git a/chrome/browser/resources/component_extension_resources.grd b/chrome/browser/resources/component_extension_resources.grd
index 6afb147..0c90627 100644
--- a/chrome/browser/resources/component_extension_resources.grd
+++ b/chrome/browser/resources/component_extension_resources.grd
@@ -16,6 +16,11 @@
       <include name="IDR_BOOKMARK_MANAGER_BOOKMARK_MANAGER_SEARCH" file="bookmark_manager/images/bookmark_manager_search.png" type="BINDATA" />
       <include name="IDR_BOOKMARK_MANAGER_MAIN" file="bookmark_manager/main.html" flattenhtml="true" type="BINDATA" />
 
+      <if expr="pp_ifdef('file_manager_extension')">
+        <include name="IDR_FILE_MANAGER_MAIN" file="file_manager/main.html" flattenhtml="true" type="BINDATA" />
+        <include name="IDR_FILE_MANAGER_ICON16" file="file_manager/images/icon16.png" type="BINDATA" />
+      </if>
+
       <if expr="pp_ifdef('touchui')">
         <include name="IDR_KEYBOARD_INDEX" file="keyboard/index.html" flattenhtml="true" type="BINDATA" />
       </if>
diff --git a/chrome/browser/resources/file_manager/css/file_manager.css b/chrome/browser/resources/file_manager/css/file_manager.css
new file mode 100644
index 0000000..0173e04
--- /dev/null
+++ b/chrome/browser/resources/file_manager/css/file_manager.css
@@ -0,0 +1,8 @@
+/*
+Copyright (c) 2010 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+*/
+h1 {
+  color: blue;
+}
diff --git a/chrome/browser/resources/file_manager/images/icon16.png b/chrome/browser/resources/file_manager/images/icon16.png
new file mode 100644
index 0000000..22696b6
--- /dev/null
+++ b/chrome/browser/resources/file_manager/images/icon16.png
Binary files differ
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
new file mode 100644
index 0000000..be1b686
--- /dev/null
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -0,0 +1,7 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function onLoad() {
+  document.body.appendChild(document.createTextNode('Hello World'));
+}
diff --git a/chrome/browser/resources/file_manager/main.html b/chrome/browser/resources/file_manager/main.html
new file mode 100644
index 0000000..ef6d23b
--- /dev/null
+++ b/chrome/browser/resources/file_manager/main.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<!--
+
+Copyright (c) 2010 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+
+-->
+<html>
+  <head>
+    <title>Placeholder File Manager Main Page</title>
+
+    <link rel="stylesheet" href="css/file_manager.css">
+
+    <script src="js/file_manager.js"></script>
+  </head>
+  <body onload="onLoad()">
+    <h1>File Manager</h1>
+    <p><img src="images/icon16.png"> Coming soon.
+  </body>
+</html>
diff --git a/chrome/browser/resources/file_manager/manifest.json b/chrome/browser/resources/file_manager/manifest.json
new file mode 100644
index 0000000..d3bd7924
--- /dev/null
+++ b/chrome/browser/resources/file_manager/manifest.json
@@ -0,0 +1,13 @@
+{
+  // chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/
+  "key": "MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDlhpGghtnNJ7pluQN0RDwbUxwwi99oM35ZEaFYvxPLrf0fIEC18cfDdJi6u4aJ+UoSpgzK731L0P/k4LvK2Rz9kVKOy0+IvuRrWkT7lbrLfA1UEBh02OA1AAshjmyRg4IxCqgl8ia8XWq6HKegS1y1KXZYGgb4qp7Bh9VC4cIzswIBIw==",
+  "name": "File Manager",
+  "version": "0.1",
+  "description": "File Manager",
+  "incognito" : "split",
+  "icons": {
+    "16": "images/icon16.png"
+  },
+  "permissions": [
+  ]
+}