Commit cd51f5f1 authored by mtomasz@chromium.org's avatar mtomasz@chromium.org

Initial redesign of the Files.app's main window.

This patch removes the window decoration, changes basic styles including the file list, the list's header and the sidebar. Along the way simplifies styles for the file list.

TEST=Not in production yet. Run with --file-manager-new-ui flag.
BUG=226912

Review URL: https://codereview.chromium.org/13771008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192821 0039d316-1c4b-4281-b951-d872f2087c98
parent 4530254c
......@@ -46,6 +46,7 @@
<if expr="pp_ifdef('file_manager_extension')">
<!-- App pages and scripts. -->
<include name="IDR_FILE_MANAGER_MAIN" file="file_manager/main.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
<include name="IDR_FILE_MANAGER_MAIN_NEW_UI" file="file_manager/main_new_ui.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
<include name="IDR_FILE_MANAGER_MAIN_JS" file="file_manager/js/main_scripts.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_FILE_MANAGER_BKGND_JS" file="file_manager/js/background.js" type="BINDATA" />
......
......@@ -257,7 +257,9 @@ function launchFileManager(opt_appState, opt_id) {
nextFileManagerWindowID = Math.max(nextFileManagerWindowID, id + 1);
var appWindow = new AppWindowWrapper(
'main.html', FILES_ID_PREFIX + id, createFileManagerOptions);
util.platform.newUI() ? 'main_new_ui.html' : 'main.html',
FILES_ID_PREFIX + id,
createFileManagerOptions);
appWindow.launch(opt_appState || {});
}
......
......@@ -857,8 +857,15 @@ DialogType.isModal = function(type) {
util.enableNewFullScreenHandler(this.document_);
this.updateWindowState_();
// Populate the static localized strings.
i18nTemplate.process(this.document_, loadTimeData);
// Initialize the new header.
if (util.platform.newUI()) {
this.dialogDom_.querySelector('#app-name').innerText =
chrome.runtime.getManifest().name;
}
};
/**
......
......@@ -219,6 +219,15 @@ DirectoryItem.prototype.decorate = function(
this.updateSubDirectories(false /* recursive */);
};
/**
* Overrides WebKit's scrollIntoViewIfNeeded, which doesn't work well with
* a complex layout. This call is not necessary, so we are ignoring it.
*
* @param {boolean} unused Unused.
*/
DirectoryItem.prototype.scrollIntoViewIfNeeded = function(unused) {
};
/**
* Invoked when the item is being expanded.
* @param {!UIEvent} e Event.
......
This diff is collapsed.
......@@ -181,7 +181,7 @@
}
],
"chrome_url_overrides": {
"files": "main.html"
"files": "main_new_ui.html"
},
// Required to import scripts in a web worker. Note, that in Apps v2, it is
// enough that anything is passed to web_accessible_resources. If there is
......@@ -195,6 +195,7 @@
"js/util.js",
"js/background.js"]
},
"content_security_policy": "default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; frame-src 'self' about:; img-src 'self' chrome://resources chrome://theme data: https://docs.google.com https://*.googleusercontent.com chrome://extension-icon; media-src 'self' https://*.googleusercontent.com; connect-src https://drive.google.com"
// chrome-extension://pmfjbimdmchhbnneeidfognadeopoehp is the image loader extension.
"content_security_policy": "default-src 'none'; script-src 'self' chrome://resources chrome-extension://pmfjbimdmchhbnneeidfognadeopoehp; style-src 'self' 'unsafe-inline' chrome://resources; frame-src 'self' about:; img-src 'self' chrome://resources chrome://theme data: https://docs.google.com https://*.googleusercontent.com chrome://extension-icon; media-src 'self' https://*.googleusercontent.com; connect-src https://drive.google.com"
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment