| OLD | NEW |
| 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/ui/webui/extensions/extension_settings_handler.h" | 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" |
| 6 | 6 |
| 7 #include "apps/app_load_service.h" | 7 #include "apps/app_load_service.h" |
| 8 #include "apps/saved_files_service.h" | 8 #include "apps/saved_files_service.h" |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 break; | 393 break; |
| 394 } | 394 } |
| 395 extension_data->SetString("blacklistText", blacklist_text); | 395 extension_data->SetString("blacklistText", blacklist_text); |
| 396 | 396 |
| 397 // Force unpacked extensions to show at the top. | 397 // Force unpacked extensions to show at the top. |
| 398 if (Manifest::IsUnpackedLocation(extension->location())) | 398 if (Manifest::IsUnpackedLocation(extension->location())) |
| 399 extension_data->SetInteger("order", 1); | 399 extension_data->SetInteger("order", 1); |
| 400 else | 400 else |
| 401 extension_data->SetInteger("order", 2); | 401 extension_data->SetInteger("order", 2); |
| 402 | 402 |
| 403 if (!ExtensionActionAPI::GetBrowserActionVisibility(prefs, extension->id())) { | 403 // Don't show the "show button" for the browser action if the toolbar |
| 404 // redesign is enabled, because "hidden" buttons are now just hidden in the |
| 405 // wrench menu. |
| 406 if (!ExtensionActionAPI::GetBrowserActionVisibility(prefs, extension->id()) && |
| 407 !FeatureSwitch::extension_action_redesign()->IsEnabled()) { |
| 404 extension_data->SetBoolean("enable_show_button", true); | 408 extension_data->SetBoolean("enable_show_button", true); |
| 405 } | 409 } |
| 406 | 410 |
| 407 // Add views | 411 // Add views |
| 408 base::ListValue* views = new base::ListValue; | 412 base::ListValue* views = new base::ListValue; |
| 409 for (std::vector<ExtensionPage>::const_iterator iter = pages.begin(); | 413 for (std::vector<ExtensionPage>::const_iterator iter = pages.begin(); |
| 410 iter != pages.end(); ++iter) { | 414 iter != pages.end(); ++iter) { |
| 411 base::DictionaryValue* view_value = new base::DictionaryValue; | 415 base::DictionaryValue* view_value = new base::DictionaryValue; |
| 412 if (iter->url.scheme() == kExtensionScheme) { | 416 if (iter->url.scheme() == kExtensionScheme) { |
| 413 // No leading slash. | 417 // No leading slash. |
| (...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 extension_service_->EnableExtension(extension_id); | 1530 extension_service_->EnableExtension(extension_id); |
| 1527 } else { | 1531 } else { |
| 1528 ExtensionErrorReporter::GetInstance()->ReportError( | 1532 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1529 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1533 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1530 true); // Be noisy. | 1534 true); // Be noisy. |
| 1531 } | 1535 } |
| 1532 requirements_checker_.reset(); | 1536 requirements_checker_.reset(); |
| 1533 } | 1537 } |
| 1534 | 1538 |
| 1535 } // namespace extensions | 1539 } // namespace extensions |
| OLD | NEW |