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

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

Issue 9814030: get rid of old options pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 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) 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/options/pack_extension_handler.h" 5 #include "chrome/browser/ui/webui/extensions/pack_extension_handler.h"
6 6
7 #include "chrome/browser/extensions/extension_creator.h" 7 #include "chrome/browser/extensions/extension_creator.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "content/public/browser/web_ui.h" 10 #include "content/public/browser/web_ui.h"
11 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
12 #include "ui/base/l10n/l10n_util.h" 12 #include "ui/base/l10n/l10n_util.h"
13 13
14 PackExtensionHandler::PackExtensionHandler() { 14 PackExtensionHandler::PackExtensionHandler() {
15 } 15 }
16 16
17 PackExtensionHandler::~PackExtensionHandler() { 17 PackExtensionHandler::~PackExtensionHandler() {
18 if (pack_job_.get()) 18 if (pack_job_.get())
19 pack_job_->ClearClient(); 19 pack_job_->ClearClient();
20 } 20 }
21 21
22 void PackExtensionHandler::GetLocalizedValues( 22 void PackExtensionHandler::GetLocalizedValues(
23 DictionaryValue* localized_strings) { 23 DictionaryValue* localized_strings) {
24 DCHECK(localized_strings); 24 DCHECK(localized_strings);
25 RegisterTitle(localized_strings, "packExtensionOverlay",
26 IDS_EXTENSION_PACK_DIALOG_TITLE);
27 25
28 localized_strings->SetString("packExtensionOverlay", 26 localized_strings->SetString("packExtensionOverlay",
29 l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_TITLE)); 27 l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_TITLE));
30 localized_strings->SetString("packExtensionHeading", 28 localized_strings->SetString("packExtensionHeading",
31 l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_HEADING)); 29 l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_HEADING));
32 localized_strings->SetString("packExtensionCommit", 30 localized_strings->SetString("packExtensionCommit",
33 l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_BUTTON)); 31 l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_BUTTON));
34 localized_strings->SetString("ok", l10n_util::GetStringUTF16(IDS_OK)); 32 localized_strings->SetString("ok", l10n_util::GetStringUTF16(IDS_OK));
35 localized_strings->SetString("cancel", l10n_util::GetStringUTF16(IDS_CANCEL)); 33 localized_strings->SetString("cancel", l10n_util::GetStringUTF16(IDS_CANCEL));
36 localized_strings->SetString("packExtensionRootDir", 34 localized_strings->SetString("packExtensionRootDir",
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 113
116 pack_job_ = new PackExtensionJob(this, root_directory, key_file, run_flags); 114 pack_job_ = new PackExtensionJob(this, root_directory, key_file, run_flags);
117 pack_job_->Start(); 115 pack_job_->Start();
118 } 116 }
119 117
120 void PackExtensionHandler::ShowAlert(const std::string& message) { 118 void PackExtensionHandler::ShowAlert(const std::string& message) {
121 ListValue arguments; 119 ListValue arguments;
122 arguments.Append(Value::CreateStringValue(message)); 120 arguments.Append(Value::CreateStringValue(message));
123 web_ui()->CallJavascriptFunction("PackExtensionOverlay.showError", arguments); 121 web_ui()->CallJavascriptFunction("PackExtensionOverlay.showError", arguments);
124 } 122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698