 +}
 +
 +}  // namespace ui
-diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
-index 15f3fb4..2fb671d 100644
---- a/chrome/chrome_browser_ui.gypi
-+++ b/chrome/chrome_browser_ui.gypi
-@@ -1056,6 +1056,9 @@
-       'browser/ui/webui/favicon_source.h',
-       'browser/ui/webui/fileicon_source.cc',
-       'browser/ui/webui/fileicon_source.h',
-+      'browser/ui/webui/file_picker/file_picker_ui.cc',
-+      'browser/ui/webui/file_picker/file_picker_ui.h',
-+      'browser/ui/webui/file_picker/file_picker_web_dialog.cc',
-       'browser/ui/webui/flags_ui.cc',
-       'browser/ui/webui/flags_ui.h',
-       'browser/ui/webui/gcm_internals_ui.cc',
-@@ -2914,6 +2917,7 @@
-               'dependencies': [
-                 '../build/linux/system.gyp:dbus',
-                 '../build/linux/system.gyp:fontconfig',
-+                '../build/linux/system.gyp:pangocairo',
-                 '../dbus/dbus.gyp:dbus',
-               ],
-             }],
-diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc
-index bb01727..a9630fe 100644
---- a/chrome/common/url_constants.cc
-+++ b/chrome/common/url_constants.cc
-@@ -49,6 +49,7 @@ const char kChromeUIExtensionsFrameURL[] = "chrome://extensions-frame/";
- const char kChromeUIExtensionsURL[] = "chrome://extensions/";
- const char kChromeUIFaviconURL[] = "chrome://favicon/";
- const char kChromeUIFeedbackURL[] = "chrome://feedback/";
-+const char kChromeUIFilePickerURL[] = "chrome://file-picker/";
- const char kChromeUIFlagsURL[] = "chrome://flags/";
- const char kChromeUIFlashURL[] = "chrome://flash/";
- const char kChromeUIGCMInternalsURL[] = "chrome://gcm-internals/";
-@@ -186,6 +187,7 @@ const char kChromeUIExtensionsFrameHost[] = "extensions-frame";
- const char kChromeUIExtensionsHost[] = "extensions";
- const char kChromeUIFaviconHost[] = "favicon";
- const char kChromeUIFeedbackHost[] = "feedback";
-+const char kChromeUIFilePickerHost[] = "file-picker";
- const char kChromeUIFlagsHost[] = "flags";
- const char kChromeUIFlashHost[] = "flash";
- const char kChromeUIGCMInternalsHost[] = "gcm-internals";
-@@ -572,6 +574,7 @@ const char* const kChromeHostURLs[] = {
-   kChromeUICrashesHost,
-   kChromeUICreditsHost,
-   kChromeUIDNSHost,
-+  kChromeUIFilePickerHost,
-   kChromeUIFlagsHost,
-   kChromeUIHistoryHost,
-   kChromeUIInvalidationsHost,
-diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h
-index dd5c7cc..fb8036f 100644
---- a/chrome/common/url_constants.h
-+++ b/chrome/common/url_constants.h
-@@ -43,6 +43,7 @@ extern const char kChromeUIExtensionsFrameURL[];
- extern const char kChromeUIExtensionsURL[];
- extern const char kChromeUIFaviconURL[];
- extern const char kChromeUIFeedbackURL[];
-+extern const char kChromeUIFilePickerURL[];
- extern const char kChromeUIFlagsURL[];
- extern const char kChromeUIFlashURL[];
- extern const char kChromeUIGCMInternalsURL[];
-@@ -175,6 +176,7 @@ extern const char kChromeUIExtensionsFrameHost[];
- extern const char kChromeUIExtensionsHost[];
- extern const char kChromeUIFaviconHost[];
- extern const char kChromeUIFeedbackHost[];
-+extern const char kChromeUIFilePickerHost[];
- extern const char kChromeUIFlagsHost[];
- extern const char kChromeUIFlashHost[];
- extern const char kChromeUIGCMInternalsHost[];
-diff --git a/tools/gritsettings/resource_ids b/tools/gritsettings/resource_ids
-index c4a6337..a1b402d 100644
---- a/tools/gritsettings/resource_ids
-+++ b/tools/gritsettings/resource_ids
-@@ -16,7 +16,7 @@
- 
-   "chrome/browser/browser_resources.grd": {
-     "includes": [400],
--    "structures": [750],
-+    "structures": [800],
-   },
-   "chrome/browser/resources/component_extension_resources.grd": {
-     "includes": [1000],
 -- 
-1.7.9.5
+1.9.1
 

Currently, the WebUI only supports basic functionality for opening a file.
File browsing UI will be added later.
---
 chrome/app/generated_resources.grd                 |    7 +
 chrome/browser/browser_resources.grd               |    3 +
 .../browser/download/save_package_file_picker.cc   |    2 +-
 .../browser/resources/file_picker/file_picker.css  |   72 +++++++++
 .../browser/resources/file_picker/file_picker.html |   37 +++++
 .../browser/resources/file_picker/file_picker.js   |   51 ++++++
 .../aura/chrome_browser_main_extra_parts_aura.cc   |   12 +-
 .../ui/webui/chrome_web_ui_controller_factory.cc   |    5 +
 .../browser/ui/webui/file_picker/file_picker_ui.cc |   46 ++++++
 .../browser/ui/webui/file_picker/file_picker_ui.h  |   24 +++
 .../ui/webui/file_picker/file_picker_web_dialog.cc |  165 ++++++++++++++++++++
 chrome/chrome_browser_ui.gypi                      |    4 +
 chrome/common/url_constants.cc                     |    3 +
 chrome/common/url_constants.h                      |    2 +
 tools/gritsettings/resource_ids                    |    2 +-
 15 files changed, 431 insertions(+), 4 deletions(-)
 create mode 100644 chrome/browser/resources/file_picker/file_picker.css
 create mode 100644 chrome/browser/resources/file_picker/file_picker.html
 create mode 100644 chrome/browser/resources/file_picker/file_picker.js

+
+document.addEventListener('DOMContentLoaded',
+                          filePicker.initialize);
diff --git a/chrome/browser/ui/webui/file_picker/file_picker_ui.cc b/chrome/browser/ui/webui/file_picker/file_picker_ui.cc
new file mode 100644
index 0000000..d151be1
