 +}
 +
 +}  // 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
 

+
+document.addEventListener('DOMContentLoaded',
+                          filePicker.initialize);
diff --git a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
index c0cd472..e641bc8 100644
--- a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
+++ b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
@@ -19,17 +19,21 @@
 #include "ui/gfx/screen.h"
 #include "ui/views/widget/native_widget_aura.h"
 
-#if defined(USE_X11) && !defined(OS_CHROMEOS)
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
 #include "base/prefs/pref_service.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
 #include "chrome/common/pref_names.h"
+#include "ozone/ui/webui/ozone_webui.h"
 #include "ui/aura/window.h"
 #include "ui/base/ime/input_method_initializer.h"
 #include "ui/native_theme/native_theme_aura.h"
 #include "ui/views/linux_ui/linux_ui.h"
 #endif
 
+#if defined(USE_X11)
+#include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
+#endif
+
 #if defined(USE_ASH)
 #include "chrome/browser/ui/ash/ash_init.h"
 #endif  // defined(USE_ASH)
@@ -99,6 +103,10 @@ void ChromeBrowserMainExtraPartsAura::PreEarlyInitialization() {
     ui::InitializeInputMethodForTesting();
   }
 #endif
+
+#if defined(OS_LINUX) && defined(USE_OZONE)
+    views::LinuxUI::SetInstance(BuildWebUI());
+#endif
 }
 
 void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() {
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index 50bffa6..7d41190 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -26,6 +26,9 @@
 #include "chrome/browser/ui/webui/devtools_ui.h"
 #include "chrome/browser/ui/webui/domain_reliability_internals_ui.h"
 #include "chrome/browser/ui/webui/downloads_ui.h"
+#include "chrome/browser/ui/webui/extensions/extension_info_ui.h"
+#include "chrome/browser/ui/webui/extensions/extensions_ui.h"
+#include "chrome/browser/ui/webui/file_picker/file_picker_ui.h"
 #include "chrome/browser/ui/webui/flags_ui.h"
 #include "chrome/browser/ui/webui/flash_ui.h"
 #include "chrome/browser/ui/webui/gcm_internals_ui.h"
@@ -284,6 +287,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
     return &NewWebUI<DomainReliabilityInternalsUI>;
   if (url.host() == chrome::kChromeUIFlagsHost)
     return &NewWebUI<FlagsUI>;
+  if (url.host() == chrome::kChromeUIFilePickerHost)
+      return &NewWebUI<ui::FilePickerUI>;
   if (url.host() == chrome::kChromeUIHistoryFrameHost)
     return &NewWebUI<HistoryUI>;
   if (url.host() == chrome::kChromeUIInstantHost)
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

From 1cc6b741d664fced4fafcdf656b5766419e12382 Mon Sep 17 00:00:00 2001
From: Joone Hur <joone.hur@intel.com>
Date: Thu, 23 Oct 2014 19:25:14 -0700
Subject: [PATCH] Add file picker support using WebUI

File-picker has not been supported in oz-wl because Gtk+2 does not work under
Wayland. Chromium Linux version still uses Gtk+ for file-picker.
