Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 #include "chrome/browser/extensions/file_manager_util.h" | 4 #include "chrome/browser/extensions/file_manager_util.h" |
| 5 | 5 |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 // browser/resources/file_manager. In the future we may provide a way to swap | 36 // browser/resources/file_manager. In the future we may provide a way to swap |
| 37 // out this file manager for an aftermarket part, but not yet. | 37 // out this file manager for an aftermarket part, but not yet. |
| 38 const char kFileBrowserExtensionUrl[] = FILEBROWSER_URL(""); | 38 const char kFileBrowserExtensionUrl[] = FILEBROWSER_URL(""); |
| 39 const char kBaseFileBrowserUrl[] = FILEBROWSER_URL("main.html"); | 39 const char kBaseFileBrowserUrl[] = FILEBROWSER_URL("main.html"); |
| 40 const char kMediaPlayerUrl[] = FILEBROWSER_URL("mediaplayer.html"); | 40 const char kMediaPlayerUrl[] = FILEBROWSER_URL("mediaplayer.html"); |
| 41 const char kMediaPlayerPlaylistUrl[] = FILEBROWSER_URL("playlist.html"); | 41 const char kMediaPlayerPlaylistUrl[] = FILEBROWSER_URL("playlist.html"); |
| 42 #undef FILEBROWSER_URL | 42 #undef FILEBROWSER_URL |
| 43 | 43 |
| 44 // List of file extension we can open in tab. | 44 // List of file extension we can open in tab. |
| 45 const char* kBrowserSupportedExtensions[] = { | 45 const char* kBrowserSupportedExtensions[] = { |
| 46 ".bmp", ".jpg", ".jpeg", ".png", ".webp", ".gif", ".pdf", ".txt", ".html", | 46 #if defined(GOOGLE_CHROME_BUILD) |
| 47 ".htm" | 47 ".pdf", |
|
Scott Byer
2011/10/19 22:11:02
Chromium can support PDF in a tab if the plug in i
tbarzic
2011/10/19 23:30:28
If we leave thing as they are, opening pdf file in
| |
| 48 #endif | |
| 49 ".bmp", ".jpg", ".jpeg", ".png", ".webp", ".gif", ".txt", ".html", ".htm" | |
| 48 }; | 50 }; |
| 49 // List of file extension that can be handled with the media player. | 51 // List of file extension that can be handled with the media player. |
| 50 const char* kAVExtensions[] = { | 52 const char* kAVExtensions[] = { |
| 51 #if defined(GOOGLE_CHROME_BUILD) || defined(USE_PROPRIETARY_CODECS) | 53 #if defined(GOOGLE_CHROME_BUILD) || defined(USE_PROPRIETARY_CODECS) |
| 52 ".3gp", ".avi", ".mp3", ".mp4", ".m4v", ".mov", ".m4a", | 54 ".3gp", ".avi", ".mp3", ".mp4", ".m4v", ".mov", ".m4a", |
| 53 #endif | 55 #endif |
| 54 ".flac", ".ogm", ".ogv", ".ogx", ".ogg", ".oga", ".wav", ".webm", | 56 ".flac", ".ogm", ".ogv", ".ogx", ".ogg", ".oga", ".wav", ".webm", |
| 55 /* TODO(zelidrag): Add unsupported ones as we enable them: | 57 /* TODO(zelidrag): Add unsupported ones as we enable them: |
| 56 ".mkv", ".divx", ".xvid", ".wmv", ".asf", ".mpeg", ".mpg", | 58 ".mkv", ".divx", ".xvid", ".wmv", ".asf", ".mpeg", ".mpg", |
| 57 ".wma", ".aiff", | 59 ".wma", ".aiff", |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 case SelectFileDialog::SELECT_OPEN_MULTI_FILE: | 311 case SelectFileDialog::SELECT_OPEN_MULTI_FILE: |
| 310 type_str = "open-multi-file"; | 312 type_str = "open-multi-file"; |
| 311 break; | 313 break; |
| 312 | 314 |
| 313 default: | 315 default: |
| 314 NOTREACHED(); | 316 NOTREACHED(); |
| 315 } | 317 } |
| 316 | 318 |
| 317 return type_str; | 319 return type_str; |
| 318 } | 320 } |
| OLD | NEW |