| 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/json/json_writer.h" | 6 #include "base/json/json_writer.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 const char kMediaPlayerUrl[] = FILEBROWSER_URL("mediaplayer.html"); | 31 const char kMediaPlayerUrl[] = FILEBROWSER_URL("mediaplayer.html"); |
| 32 const char kMediaPlayerPlaylistUrl[] = FILEBROWSER_URL("playlist.html"); | 32 const char kMediaPlayerPlaylistUrl[] = FILEBROWSER_URL("playlist.html"); |
| 33 #undef FILEBROWSER_URL | 33 #undef FILEBROWSER_URL |
| 34 | 34 |
| 35 // List of file extension we can open in tab. | 35 // List of file extension we can open in tab. |
| 36 const char* kBrowserSupportedExtensions[] = { | 36 const char* kBrowserSupportedExtensions[] = { |
| 37 ".jpg", ".jpeg", ".png", ".webp", ".gif", ".pdf", ".txt", ".html", ".htm" | 37 ".jpg", ".jpeg", ".png", ".webp", ".gif", ".pdf", ".txt", ".html", ".htm" |
| 38 }; | 38 }; |
| 39 // List of file extension that can be handled with the media player. | 39 // List of file extension that can be handled with the media player. |
| 40 const char* kAVExtensions[] = { | 40 const char* kAVExtensions[] = { |
| 41 ".webm", ".mp4", ".m4v", ".mov", ".ogm", ".ogv", ".ogx", | 41 ".avi", ".webm", ".mp4", ".m4v", ".mov", ".ogm", ".ogv", ".ogx", |
| 42 ".mp3", ".m4a", ".ogg", ".oga", ".wav", | 42 ".mp3", ".m4a", ".ogg", ".oga", ".wav", |
| 43 /* TODO(zelidrag): Add unsupported ones as we enable them: | 43 /* TODO(zelidrag): Add unsupported ones as we enable them: |
| 44 ".3gp", ".mkv", ".avi", ".divx", ".xvid", ".wmv", ".asf", ".mpeg", ".mpg", | 44 ".3gp", ".mkv", ".avi", ".divx", ".xvid", ".wmv", ".asf", ".mpeg", ".mpg", |
| 45 ".wma", ".aiff", | 45 ".wma", ".aiff", |
| 46 */ | 46 */ |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 bool IsSupportedBrowserExtension(const char* ext) { | 49 bool IsSupportedBrowserExtension(const char* ext) { |
| 50 for (size_t i = 0; i < arraysize(kBrowserSupportedExtensions); i++) { | 50 for (size_t i = 0; i < arraysize(kBrowserSupportedExtensions); i++) { |
| 51 if (base::strcasecmp(ext, kBrowserSupportedExtensions[i]) == 0) { | 51 if (base::strcasecmp(ext, kBrowserSupportedExtensions[i]) == 0) { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 case SelectFileDialog::SELECT_OPEN_MULTI_FILE: | 246 case SelectFileDialog::SELECT_OPEN_MULTI_FILE: |
| 247 type_str = "open-multi-file"; | 247 type_str = "open-multi-file"; |
| 248 break; | 248 break; |
| 249 | 249 |
| 250 default: | 250 default: |
| 251 NOTREACHED(); | 251 NOTREACHED(); |
| 252 } | 252 } |
| 253 | 253 |
| 254 return type_str; | 254 return type_str; |
| 255 } | 255 } |
| OLD | NEW |