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

Side by Side Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 10689097: Enforce the 'requirements' field in manifests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Changed plugins requirement schema Created 8 years, 4 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
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/ui/webui/ntp/app_launcher_handler.h" 5 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 &(web_app->icons[0].data))) { 770 &(web_app->icons[0].data))) {
771 web_app->icons[0].url = GURL(); 771 web_app->icons[0].url = GURL();
772 web_app->icons[0].width = web_app->icons[0].data.width(); 772 web_app->icons[0].width = web_app->icons[0].data.width();
773 web_app->icons[0].height = web_app->icons[0].data.height(); 773 web_app->icons[0].height = web_app->icons[0].data.height();
774 } else { 774 } else {
775 web_app->icons.clear(); 775 web_app->icons.clear();
776 } 776 }
777 777
778 scoped_refptr<CrxInstaller> installer( 778 scoped_refptr<CrxInstaller> installer(
779 CrxInstaller::Create(extension_service_, NULL)); 779 CrxInstaller::Create(extension_service_, NULL));
780 installer->set_error_on_unsupported_requirements(true);
780 installer->set_page_ordinal(install_info->page_ordinal); 781 installer->set_page_ordinal(install_info->page_ordinal);
781 installer->InstallWebApp(*web_app); 782 installer->InstallWebApp(*web_app);
782 attempted_bookmark_app_install_ = true; 783 attempted_bookmark_app_install_ = true;
783 } 784 }
784 785
785 void AppLauncherHandler::SetAppToBeHighlighted() { 786 void AppLauncherHandler::SetAppToBeHighlighted() {
786 if (highlight_app_id_.empty()) 787 if (highlight_app_id_.empty())
787 return; 788 return;
788 789
789 StringValue app_id(highlight_app_id_); 790 StringValue app_id(highlight_app_id_);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 941
941 ExtensionInstallPrompt* AppLauncherHandler::GetExtensionInstallPrompt() { 942 ExtensionInstallPrompt* AppLauncherHandler::GetExtensionInstallPrompt() {
942 if (!extension_install_ui_.get()) { 943 if (!extension_install_ui_.get()) {
943 Browser* browser = browser::FindBrowserWithWebContents( 944 Browser* browser = browser::FindBrowserWithWebContents(
944 web_ui()->GetWebContents()); 945 web_ui()->GetWebContents());
945 extension_install_ui_.reset( 946 extension_install_ui_.reset(
946 chrome::CreateExtensionInstallPromptWithBrowser(browser)); 947 chrome::CreateExtensionInstallPromptWithBrowser(browser));
947 } 948 }
948 return extension_install_ui_.get(); 949 return extension_install_ui_.get();
949 } 950 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698