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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 106713002: Move LaunchContainer enum to extension_constants.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/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/app_restore_service.h" 8 #include "apps/app_restore_service.h"
9 #include "apps/saved_files_service.h" 9 #include "apps/saved_files_service.h"
10 #include "apps/shell_window.h" 10 #include "apps/shell_window.h"
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 } 800 }
801 801
802 void ExtensionSettingsHandler::HandleLaunchMessage( 802 void ExtensionSettingsHandler::HandleLaunchMessage(
803 const base::ListValue* args) { 803 const base::ListValue* args) {
804 CHECK_EQ(1U, args->GetSize()); 804 CHECK_EQ(1U, args->GetSize());
805 std::string extension_id; 805 std::string extension_id;
806 CHECK(args->GetString(0, &extension_id)); 806 CHECK(args->GetString(0, &extension_id));
807 const Extension* extension = 807 const Extension* extension =
808 extension_service_->GetExtensionById(extension_id, false); 808 extension_service_->GetExtensionById(extension_id, false);
809 OpenApplication(AppLaunchParams(extension_service_->profile(), extension, 809 OpenApplication(AppLaunchParams(extension_service_->profile(), extension,
810 extensions::LAUNCH_WINDOW, NEW_WINDOW)); 810 extensions::LAUNCH_CONTAINER_WINDOW,
811 NEW_WINDOW));
811 } 812 }
812 813
813 void ExtensionSettingsHandler::HandleReloadMessage( 814 void ExtensionSettingsHandler::HandleReloadMessage(
814 const base::ListValue* args) { 815 const base::ListValue* args) {
815 std::string extension_id = UTF16ToUTF8(ExtractStringValue(args)); 816 std::string extension_id = UTF16ToUTF8(ExtractStringValue(args));
816 CHECK(!extension_id.empty()); 817 CHECK(!extension_id.empty());
817 extension_service_->ReloadExtension(extension_id); 818 extension_service_->ReloadExtension(extension_id);
818 } 819 }
819 820
820 void ExtensionSettingsHandler::HandleEnableMessage( 821 void ExtensionSettingsHandler::HandleEnableMessage(
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 extension_service_->EnableExtension(extension_id); 1225 extension_service_->EnableExtension(extension_id);
1225 } else { 1226 } else {
1226 ExtensionErrorReporter::GetInstance()->ReportError( 1227 ExtensionErrorReporter::GetInstance()->ReportError(
1227 UTF8ToUTF16(JoinString(requirement_errors, ' ')), 1228 UTF8ToUTF16(JoinString(requirement_errors, ' ')),
1228 true /* be noisy */); 1229 true /* be noisy */);
1229 } 1230 }
1230 requirements_checker_.reset(); 1231 requirements_checker_.reset();
1231 } 1232 }
1232 1233
1233 } // namespace extensions 1234 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698