| 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/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 path.append(EscapeUrlEncodedData(full_path.value(), false)); | 231 path.append(EscapeUrlEncodedData(full_path.value(), false)); |
| 232 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { | 232 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { |
| 233 bool result = BrowserThread::PostTask( | 233 bool result = BrowserThread::PostTask( |
| 234 BrowserThread::UI, FROM_HERE, | 234 BrowserThread::UI, FROM_HERE, |
| 235 NewRunnableFunction(&ViewItem, full_path, enqueue)); | 235 NewRunnableFunction(&ViewItem, full_path, enqueue)); |
| 236 DCHECK(result); | 236 DCHECK(result); |
| 237 return; | 237 return; |
| 238 } | 238 } |
| 239 Browser* browser = BrowserList::GetLastActive(); | 239 Browser* browser = BrowserList::GetLastActive(); |
| 240 if (browser) | 240 if (browser) |
| 241 browser->AddSelectedTabWithURL(GURL(path), PageTransition::LINK); | 241 browser->AddSelectedTabWithURL(GURL(path), content::PAGE_TRANSITION_LINK); |
| 242 return; | 242 return; |
| 243 } | 243 } |
| 244 #if defined(OS_CHROMEOS) | 244 #if defined(OS_CHROMEOS) |
| 245 if (IsSupportedAVExtension(ext.data())) { | 245 if (IsSupportedAVExtension(ext.data())) { |
| 246 Browser* browser = BrowserList::GetLastActive(); | 246 Browser* browser = BrowserList::GetLastActive(); |
| 247 if (!browser) | 247 if (!browser) |
| 248 return; | 248 return; |
| 249 MediaPlayer* mediaplayer = MediaPlayer::GetInstance(); | 249 MediaPlayer* mediaplayer = MediaPlayer::GetInstance(); |
| 250 | 250 |
| 251 if (mediaplayer->GetPlaylist().empty()) | 251 if (mediaplayer->GetPlaylist().empty()) |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 case SelectFileDialog::SELECT_OPEN_MULTI_FILE: | 308 case SelectFileDialog::SELECT_OPEN_MULTI_FILE: |
| 309 type_str = "open-multi-file"; | 309 type_str = "open-multi-file"; |
| 310 break; | 310 break; |
| 311 | 311 |
| 312 default: | 312 default: |
| 313 NOTREACHED(); | 313 NOTREACHED(); |
| 314 } | 314 } |
| 315 | 315 |
| 316 return type_str; | 316 return type_str; |
| 317 } | 317 } |
| OLD | NEW |