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

Side by Side Diff: chrome/browser/extensions/extensions_ui.cc

Issue 7649006: more changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another typo Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extensions/extensions_ui.h" 5 #include "chrome/browser/extensions/extensions_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 462
463 void ExtensionsDOMHandler::HandleLoadMessage(const ListValue* args) { 463 void ExtensionsDOMHandler::HandleLoadMessage(const ListValue* args) {
464 FilePath::StringType string_path; 464 FilePath::StringType string_path;
465 CHECK(args->GetSize() == 1) << args->GetSize(); 465 CHECK(args->GetSize() == 1) << args->GetSize();
466 CHECK(args->GetString(0, &string_path)); 466 CHECK(args->GetString(0, &string_path));
467 extension_service_->LoadExtension(FilePath(string_path)); 467 extension_service_->LoadExtension(FilePath(string_path));
468 } 468 }
469 469
470 void ExtensionsDOMHandler::ShowAlert(const std::string& message) { 470 void ExtensionsDOMHandler::ShowAlert(const std::string& message) {
471 ListValue arguments; 471 ListValue arguments;
472 arguments.Append(Value::CreateStringValue(message)); 472 arguments.Append(base::StringValue::New(message));
473 web_ui_->CallJavascriptFunction("alert", arguments); 473 web_ui_->CallJavascriptFunction("alert", arguments);
474 } 474 }
475 475
476 void ExtensionsDOMHandler::HandlePackMessage(const ListValue* args) { 476 void ExtensionsDOMHandler::HandlePackMessage(const ListValue* args) {
477 std::string extension_path; 477 std::string extension_path;
478 std::string private_key_path; 478 std::string private_key_path;
479 CHECK(args->GetSize() == 2); 479 CHECK(args->GetSize() == 2);
480 CHECK(args->GetString(0, &extension_path)); 480 CHECK(args->GetString(0, &extension_path));
481 CHECK(args->GetString(1, &private_key_path)); 481 CHECK(args->GetString(1, &private_key_path));
482 482
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 load_extension_dialog_->SelectFile(type, select_title, FilePath(), &info, 563 load_extension_dialog_->SelectFile(type, select_title, FilePath(), &info,
564 file_type_index, FILE_PATH_LITERAL(""), web_ui_->tab_contents(), 564 file_type_index, FILE_PATH_LITERAL(""), web_ui_->tab_contents(),
565 web_ui_->tab_contents()->view()->GetTopLevelNativeWindow(), NULL); 565 web_ui_->tab_contents()->view()->GetTopLevelNativeWindow(), NULL);
566 } 566 }
567 567
568 568
569 void ExtensionsDOMHandler::FileSelected(const FilePath& path, int index, 569 void ExtensionsDOMHandler::FileSelected(const FilePath& path, int index,
570 void* params) { 570 void* params) {
571 // Add the extensions to the results structure. 571 // Add the extensions to the results structure.
572 ListValue results; 572 ListValue results;
573 results.Append(Value::CreateStringValue(path.value())); 573 results.Append(base::StringValue::New(path.value()));
574 web_ui_->CallJavascriptFunction("window.handleFilePathSelected", results); 574 web_ui_->CallJavascriptFunction("window.handleFilePathSelected", results);
575 } 575 }
576 576
577 void ExtensionsDOMHandler::MultiFilesSelected( 577 void ExtensionsDOMHandler::MultiFilesSelected(
578 const std::vector<FilePath>& files, void* params) { 578 const std::vector<FilePath>& files, void* params) {
579 NOTREACHED(); 579 NOTREACHED();
580 } 580 }
581 581
582 void ExtensionsDOMHandler::Observe(int type, 582 void ExtensionsDOMHandler::Observe(int type,
583 const NotificationSource& source, 583 const NotificationSource& source,
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 return ResourceBundle::GetSharedInstance(). 797 return ResourceBundle::GetSharedInstance().
798 LoadDataResourceBytes(IDR_PLUGIN); 798 LoadDataResourceBytes(IDR_PLUGIN);
799 } 799 }
800 800
801 // static 801 // static
802 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { 802 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) {
803 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, 803 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode,
804 false, 804 false,
805 PrefService::SYNCABLE_PREF); 805 PrefService::SYNCABLE_PREF);
806 } 806 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698