OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/thread.h" | 10 #include "base/thread.h" |
11 #include "chrome/browser/browser.h" | 11 #include "chrome/browser/browser.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/chrome_thread.h" | |
14 #include "chrome/browser/debugger/devtools_manager.h" | 13 #include "chrome/browser/debugger/devtools_manager.h" |
15 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 14 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
16 #include "chrome/browser/extensions/extension_message_service.h" | 15 #include "chrome/browser/extensions/extension_message_service.h" |
17 #include "chrome/browser/extensions/extensions_service.h" | 16 #include "chrome/browser/extensions/extensions_service.h" |
18 #include "chrome/browser/extensions/extension_updater.h" | 17 #include "chrome/browser/extensions/extension_updater.h" |
19 #include "chrome/browser/profile.h" | 18 #include "chrome/browser/profile.h" |
20 #include "chrome/browser/renderer_host/render_process_host.h" | 19 #include "chrome/browser/renderer_host/render_process_host.h" |
21 #include "chrome/browser/renderer_host/render_widget_host.h" | 20 #include "chrome/browser/renderer_host/render_widget_host.h" |
22 #include "chrome/browser/renderer_host/render_view_host.h" | 21 #include "chrome/browser/renderer_host/render_view_host.h" |
23 #include "chrome/browser/tab_contents/tab_contents.h" | 22 #include "chrome/browser/tab_contents/tab_contents.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 257 |
259 return; | 258 return; |
260 } | 259 } |
261 | 260 |
262 if (!private_key_path.empty() && key_file.empty()) { | 261 if (!private_key_path.empty() && key_file.empty()) { |
263 ShowAlert(l10n_util::GetStringUTF8( | 262 ShowAlert(l10n_util::GetStringUTF8( |
264 IDS_EXTENSION_PACK_DIALOG_ERROR_KEY_INVALID)); | 263 IDS_EXTENSION_PACK_DIALOG_ERROR_KEY_INVALID)); |
265 return; | 264 return; |
266 } | 265 } |
267 | 266 |
268 pack_job_ = new PackExtensionJob(this, root_directory, key_file, | 267 pack_job_ = new PackExtensionJob(this, root_directory, key_file); |
269 ChromeThread::GetMessageLoop(ChromeThread::FILE)); | |
270 } | 268 } |
271 | 269 |
272 void ExtensionsDOMHandler::OnPackSuccess(const FilePath& crx_file, | 270 void ExtensionsDOMHandler::OnPackSuccess(const FilePath& crx_file, |
273 const FilePath& pem_file) { | 271 const FilePath& pem_file) { |
274 std::string message; | 272 std::string message; |
275 if (!pem_file.empty()) { | 273 if (!pem_file.empty()) { |
276 message = WideToASCII(l10n_util::GetStringF( | 274 message = WideToASCII(l10n_util::GetStringF( |
277 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW, | 275 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW, |
278 crx_file.ToWStringHack(), | 276 crx_file.ToWStringHack(), |
279 pem_file.ToWStringHack())); | 277 pem_file.ToWStringHack())); |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, | 507 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, |
510 NewRunnableMethod(&chrome_url_data_manager, | 508 NewRunnableMethod(&chrome_url_data_manager, |
511 &ChromeURLDataManager::AddDataSource, html_source)); | 509 &ChromeURLDataManager::AddDataSource, html_source)); |
512 } | 510 } |
513 | 511 |
514 // static | 512 // static |
515 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { | 513 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { |
516 return ResourceBundle::GetSharedInstance(). | 514 return ResourceBundle::GetSharedInstance(). |
517 LoadImageResourceBytes(IDR_PLUGIN); | 515 LoadImageResourceBytes(IDR_PLUGIN); |
518 } | 516 } |
OLD | NEW |