Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: chrome/browser/chromeos/extensions/file_browser_private_api.cc

Issue 10094012: Made File Manager respect the user-selected launch type (tab/pinned tab/window/fullscreen) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/extensions/file_browser_private_api.h" 5 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 } 844 }
845 845
846 void ViewFilesFunction::GetLocalPathsResponseOnUIThread( 846 void ViewFilesFunction::GetLocalPathsResponseOnUIThread(
847 const std::string& internal_task_id, 847 const std::string& internal_task_id,
848 const SelectedFileInfoList& files) { 848 const SelectedFileInfoList& files) {
849 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 849 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
850 bool success = true; 850 bool success = true;
851 for (SelectedFileInfoList::const_iterator iter = files.begin(); 851 for (SelectedFileInfoList::const_iterator iter = files.begin();
852 iter != files.end(); 852 iter != files.end();
853 ++iter) { 853 ++iter) {
854 bool handled = file_manager_util::TryViewingFile(iter->path); 854 bool handled = file_manager_util::TryViewingFile(profile(), iter->path);
855 // If there is no default browser-defined handler for viewing this type 855 // If there is no default browser-defined handler for viewing this type
856 // of file, try to see if we have any extension installed for it instead. 856 // of file, try to see if we have any extension installed for it instead.
857 if (!handled && files.size() == 1) 857 if (!handled && files.size() == 1)
858 success = false; 858 success = false;
859 } 859 }
860 result_.reset(Value::CreateBooleanValue(success)); 860 result_.reset(Value::CreateBooleanValue(success));
861 SendResponse(true); 861 SendResponse(true);
862 } 862 }
863 863
864 SelectFilesFunction::SelectFilesFunction() { 864 SelectFilesFunction::SelectFilesFunction() {
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 SET_STRING(IDS_FILE_BROWSER, GDATA_CANNOT_REACH); 1473 SET_STRING(IDS_FILE_BROWSER, GDATA_CANNOT_REACH);
1474 SET_STRING(IDS_FILE_BROWSER, GDATA_RETRY); 1474 SET_STRING(IDS_FILE_BROWSER, GDATA_RETRY);
1475 1475
1476 SET_STRING(IDS_FILE_BROWSER, AUDIO_PLAYER_TITLE); 1476 SET_STRING(IDS_FILE_BROWSER, AUDIO_PLAYER_TITLE);
1477 #undef SET_STRING 1477 #undef SET_STRING
1478 1478
1479 dict->SetString("GDATA_LEARN_MORE", 1479 dict->SetString("GDATA_LEARN_MORE",
1480 l10n_util::GetStringUTF16(IDS_LEARN_MORE)); 1480 l10n_util::GetStringUTF16(IDS_LEARN_MORE));
1481 1481
1482 dict->SetString("PDF_VIEW_ENABLED", 1482 dict->SetString("PDF_VIEW_ENABLED",
1483 file_manager_util::ShouldBeOpenedWithPdfPlugin(".pdf") ? 1483 file_manager_util::ShouldBeOpenedWithPdfPlugin(profile(), ".pdf") ?
1484 "true" : "false"); 1484 "true" : "false");
1485 1485
1486 ChromeURLDataManager::DataSource::SetFontAndTextDirection(dict); 1486 ChromeURLDataManager::DataSource::SetFontAndTextDirection(dict);
1487 1487
1488 if (gdata::util::IsGDataAvailable(profile_)) 1488 if (gdata::util::IsGDataAvailable(profile()))
1489 dict->SetString("ENABLE_GDATA", "1"); 1489 dict->SetString("ENABLE_GDATA", "1");
1490 1490
1491 return true; 1491 return true;
1492 } 1492 }
1493 1493
1494 GetGDataFilePropertiesFunction::GetGDataFilePropertiesFunction() { 1494 GetGDataFilePropertiesFunction::GetGDataFilePropertiesFunction() {
1495 } 1495 }
1496 1496
1497 GetGDataFilePropertiesFunction::~GetGDataFilePropertiesFunction() { 1497 GetGDataFilePropertiesFunction::~GetGDataFilePropertiesFunction() {
1498 } 1498 }
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 if (value->GetBoolean("cellularDisabled", &tmp)) { 1972 if (value->GetBoolean("cellularDisabled", &tmp)) {
1973 service->SetBoolean(prefs::kDisableGDataOverCellular, tmp); 1973 service->SetBoolean(prefs::kDisableGDataOverCellular, tmp);
1974 } 1974 }
1975 1975
1976 if (value->GetBoolean("hostedFilesDisabled", &tmp)) { 1976 if (value->GetBoolean("hostedFilesDisabled", &tmp)) {
1977 service->SetBoolean(prefs::kDisableGDataHostedFiles, tmp); 1977 service->SetBoolean(prefs::kDisableGDataHostedFiles, tmp);
1978 } 1978 }
1979 1979
1980 return true; 1980 return true;
1981 } 1981 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698