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 | 4 |
5 #include "chrome/browser/extensions/extension_file_browser_private_api.h" | 5 #include "chrome/browser/extensions/extension_file_browser_private_api.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1049 void ViewFilesFunction::GetLocalPathsResponseOnUIThread( | 1049 void ViewFilesFunction::GetLocalPathsResponseOnUIThread( |
1050 const FilePathList& files, void* context) { | 1050 const FilePathList& files, void* context) { |
1051 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1051 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1052 DCHECK(context); | 1052 DCHECK(context); |
1053 scoped_ptr<std::string> internal_task_id( | 1053 scoped_ptr<std::string> internal_task_id( |
1054 reinterpret_cast<std::string*>(context)); | 1054 reinterpret_cast<std::string*>(context)); |
1055 for (FilePathList::const_iterator iter = files.begin(); | 1055 for (FilePathList::const_iterator iter = files.begin(); |
1056 iter != files.end(); | 1056 iter != files.end(); |
1057 ++iter) { | 1057 ++iter) { |
1058 FileManagerUtil::ViewItem(*iter, | 1058 FileManagerUtil::ViewItem(*iter, |
1059 *(internal_task_id.get()) == kEnqueueTaskId); | 1059 *(internal_task_id.get()) == kEnqueueTaskId || |
1060 // The first one need to be forced to play. | |
Vladislav Kaznacheev
2011/08/10 13:34:58
need -> needs. Maybe rewrite a comment to be more
SeRya
2011/08/10 15:51:00
Rewritten.
| |
1061 iter != files.begin()); | |
1060 } | 1062 } |
1061 SendResponse(true); | 1063 SendResponse(true); |
1062 } | 1064 } |
1063 | 1065 |
1064 SelectFilesFunction::SelectFilesFunction() { | 1066 SelectFilesFunction::SelectFilesFunction() { |
1065 } | 1067 } |
1066 | 1068 |
1067 SelectFilesFunction::~SelectFilesFunction() { | 1069 SelectFilesFunction::~SelectFilesFunction() { |
1068 } | 1070 } |
1069 | 1071 |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1469 #undef SET_STRING | 1471 #undef SET_STRING |
1470 | 1472 |
1471 // TODO(serya): Create a new string in .grd file for this one in M13. | 1473 // TODO(serya): Create a new string in .grd file for this one in M13. |
1472 dict->SetString("PREVIEW_IMAGE", | 1474 dict->SetString("PREVIEW_IMAGE", |
1473 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_VIEW_CERT_BUTTON)); | 1475 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_VIEW_CERT_BUTTON)); |
1474 dict->SetString("PLAY_MEDIA", | 1476 dict->SetString("PLAY_MEDIA", |
1475 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY)); | 1477 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY)); |
1476 | 1478 |
1477 return true; | 1479 return true; |
1478 } | 1480 } |
OLD | NEW |