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/options/pack_extension_handler.h" | 5 #include "chrome/browser/ui/webui/options/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::Initialize() { | 22 void PackExtensionHandler::InitializeHandler() { |
Dan Beam
2012/03/13 23:01:45
and this
| |
23 } | 23 } |
24 | 24 |
25 void PackExtensionHandler::GetLocalizedValues( | 25 void PackExtensionHandler::GetLocalizedValues( |
26 DictionaryValue* localized_strings) { | 26 DictionaryValue* localized_strings) { |
27 DCHECK(localized_strings); | 27 DCHECK(localized_strings); |
28 RegisterTitle(localized_strings, "packExtensionOverlay", | 28 RegisterTitle(localized_strings, "packExtensionOverlay", |
29 IDS_EXTENSION_PACK_DIALOG_TITLE); | 29 IDS_EXTENSION_PACK_DIALOG_TITLE); |
30 | 30 |
31 localized_strings->SetString("packExtensionOverlay", | 31 localized_strings->SetString("packExtensionOverlay", |
32 l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_TITLE)); | 32 l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_TITLE)); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
118 | 118 |
119 pack_job_ = new PackExtensionJob(this, root_directory, key_file, run_flags); | 119 pack_job_ = new PackExtensionJob(this, root_directory, key_file, run_flags); |
120 pack_job_->Start(); | 120 pack_job_->Start(); |
121 } | 121 } |
122 | 122 |
123 void PackExtensionHandler::ShowAlert(const std::string& message) { | 123 void PackExtensionHandler::ShowAlert(const std::string& message) { |
124 ListValue arguments; | 124 ListValue arguments; |
125 arguments.Append(Value::CreateStringValue(message)); | 125 arguments.Append(Value::CreateStringValue(message)); |
126 web_ui()->CallJavascriptFunction("PackExtensionOverlay.showError", arguments); | 126 web_ui()->CallJavascriptFunction("PackExtensionOverlay.showError", arguments); |
127 } | 127 } |
OLD | NEW |