OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_manager/private_api_strings.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_strings.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/extensions/file_manager/open_with_browser.h" | 7 #include "chrome/browser/chromeos/extensions/file_manager/open_with_browser.h" |
8 #include "chrome/browser/chromeos/system/statistics_provider.h" | 8 #include "chrome/browser/chromeos/system/statistics_provider.h" |
9 #include "grit/app_locale_settings.h" | 9 #include "grit/app_locale_settings.h" |
10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
11 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
12 #include "ui/webui/web_ui_util.h" | 12 #include "ui/webui/web_ui_util.h" |
13 | 13 |
14 namespace file_manager { | 14 namespace extensions { |
15 | 15 |
16 GetStringsFunction::GetStringsFunction() { | 16 GetStringsFunction::GetStringsFunction() { |
17 } | 17 } |
18 | 18 |
19 GetStringsFunction::~GetStringsFunction() { | 19 GetStringsFunction::~GetStringsFunction() { |
20 } | 20 } |
21 | 21 |
22 bool GetStringsFunction::RunImpl() { | 22 bool GetStringsFunction::RunImpl() { |
23 DictionaryValue* dict = new DictionaryValue(); | 23 DictionaryValue* dict = new DictionaryValue(); |
24 SetResult(dict); | 24 SetResult(dict); |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 SET_STRING("SPACE_AVAILABLE", IDS_FILE_BROWSER_SPACE_AVAILABLE); | 502 SET_STRING("SPACE_AVAILABLE", IDS_FILE_BROWSER_SPACE_AVAILABLE); |
503 SET_STRING("WAITING_FOR_SPACE_INFO", IDS_FILE_BROWSER_WAITING_FOR_SPACE_INFO); | 503 SET_STRING("WAITING_FOR_SPACE_INFO", IDS_FILE_BROWSER_WAITING_FOR_SPACE_INFO); |
504 SET_STRING("FAILED_SPACE_INFO", IDS_FILE_BROWSER_FAILED_SPACE_INFO); | 504 SET_STRING("FAILED_SPACE_INFO", IDS_FILE_BROWSER_FAILED_SPACE_INFO); |
505 | 505 |
506 SET_STRING("DRIVE_NOT_REACHED", IDS_FILE_BROWSER_DRIVE_NOT_REACHED); | 506 SET_STRING("DRIVE_NOT_REACHED", IDS_FILE_BROWSER_DRIVE_NOT_REACHED); |
507 | 507 |
508 SET_STRING("HELP_LINK_LABEL", IDS_FILE_BROWSER_HELP_LINK_LABEL); | 508 SET_STRING("HELP_LINK_LABEL", IDS_FILE_BROWSER_HELP_LINK_LABEL); |
509 #undef SET_STRING | 509 #undef SET_STRING |
510 | 510 |
511 dict->SetBoolean("PDF_VIEW_ENABLED", | 511 dict->SetBoolean("PDF_VIEW_ENABLED", |
512 util::ShouldBeOpenedWithPlugin(profile(), | 512 file_manager::util::ShouldBeOpenedWithPlugin(profile(), |
513 FILE_PATH_LITERAL(".pdf"))); | 513 FILE_PATH_LITERAL(".pdf"))); |
514 dict->SetBoolean("SWF_VIEW_ENABLED", | 514 dict->SetBoolean("SWF_VIEW_ENABLED", |
515 util::ShouldBeOpenedWithPlugin(profile(), | 515 file_manager::util::ShouldBeOpenedWithPlugin(profile(), |
516 FILE_PATH_LITERAL(".swf"))); | 516 FILE_PATH_LITERAL(".swf"))); |
517 | 517 |
518 webui::SetFontAndTextDirection(dict); | 518 webui::SetFontAndTextDirection(dict); |
519 | 519 |
520 std::string board; | 520 std::string board; |
521 chromeos::system::StatisticsProvider* provider = | 521 chromeos::system::StatisticsProvider* provider = |
522 chromeos::system::StatisticsProvider::GetInstance(); | 522 chromeos::system::StatisticsProvider::GetInstance(); |
523 if (!provider->GetMachineStatistic(chromeos::system::kMachineInfoBoard, | 523 if (!provider->GetMachineStatistic(chromeos::system::kMachineInfoBoard, |
524 &board)) { | 524 &board)) { |
525 board = "unknown"; | 525 board = "unknown"; |
526 } | 526 } |
527 dict->SetString(chromeos::system::kMachineInfoBoard, board); | 527 dict->SetString(chromeos::system::kMachineInfoBoard, board); |
528 return true; | 528 return true; |
529 } | 529 } |
530 | 530 |
531 } // namespace file_manager | 531 } // namespace extensions |
OLD | NEW |