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/browser/webui/web_ui.h" |
10 #include "grit/generated_resources.h" | 11 #include "grit/generated_resources.h" |
11 #include "ui/base/l10n/l10n_util.h" | 12 #include "ui/base/l10n/l10n_util.h" |
12 | 13 |
13 PackExtensionHandler::PackExtensionHandler() { | 14 PackExtensionHandler::PackExtensionHandler() { |
14 } | 15 } |
15 | 16 |
16 PackExtensionHandler::~PackExtensionHandler() { | 17 PackExtensionHandler::~PackExtensionHandler() { |
17 if (pack_job_.get()) | 18 if (pack_job_.get()) |
18 pack_job_->ClearClient(); | 19 pack_job_->ClearClient(); |
19 } | 20 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 114 |
114 pack_job_ = new PackExtensionJob(this, root_directory, key_file, run_flags); | 115 pack_job_ = new PackExtensionJob(this, root_directory, key_file, run_flags); |
115 pack_job_->Start(); | 116 pack_job_->Start(); |
116 } | 117 } |
117 | 118 |
118 void PackExtensionHandler::ShowAlert(const std::string& message) { | 119 void PackExtensionHandler::ShowAlert(const std::string& message) { |
119 ListValue arguments; | 120 ListValue arguments; |
120 arguments.Append(Value::CreateStringValue(message)); | 121 arguments.Append(Value::CreateStringValue(message)); |
121 web_ui()->CallJavascriptFunction("alert", arguments); | 122 web_ui()->CallJavascriptFunction("alert", arguments); |
122 } | 123 } |
OLD | NEW |