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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_PACK_EXTENSION_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_PACK_EXTENSION_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_PACK_EXTENSION_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_PACK_EXTENSION_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "chrome/browser/browsing_data_remover.h" | 11 #include "chrome/browser/browsing_data_remover.h" |
12 #include "chrome/browser/extensions/pack_extension_job.h" | 12 #include "chrome/browser/extensions/pack_extension_job.h" |
13 #include "chrome/browser/plugin_data_remover_helper.h" | 13 #include "chrome/browser/plugin_data_remover_helper.h" |
14 #include "chrome/browser/ui/webui/options/options_ui.h" | 14 #include "content/public/browser/web_ui_message_handler.h" |
15 | 15 |
16 // Clear browser data handler page UI handler. | 16 // Clear browser data handler page UI handler. |
17 class PackExtensionHandler : public OptionsPageUIHandler, | 17 class PackExtensionHandler : public content::WebUIMessageHandler, |
18 public PackExtensionJob::Client { | 18 public PackExtensionJob::Client { |
19 public: | 19 public: |
20 PackExtensionHandler(); | 20 PackExtensionHandler(); |
21 virtual ~PackExtensionHandler(); | 21 virtual ~PackExtensionHandler(); |
22 | 22 |
23 // OptionsPageUIHandler implementation. | 23 void GetLocalizedValues(DictionaryValue* localized_strings); |
24 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; | |
25 | 24 |
26 // WebUIMessageHandler implementation. | 25 // WebUIMessageHandler implementation. |
27 virtual void RegisterMessages() OVERRIDE; | 26 virtual void RegisterMessages() OVERRIDE; |
28 | 27 |
29 // ExtensionPackJob::Client | 28 // ExtensionPackJob::Client |
30 virtual void OnPackSuccess(const FilePath& crx_file, | 29 virtual void OnPackSuccess(const FilePath& crx_file, |
31 const FilePath& key_file) OVERRIDE; | 30 const FilePath& key_file) OVERRIDE; |
32 | 31 |
33 virtual void OnPackFailure(const std::string& error, | 32 virtual void OnPackFailure(const std::string& error, |
34 ExtensionCreator::ErrorType) OVERRIDE; | 33 ExtensionCreator::ErrorType) OVERRIDE; |
(...skipping 10 matching lines...) Expand all Loading... |
45 | 44 |
46 // Path to root directory of extension | 45 // Path to root directory of extension |
47 std::string extension_path_; | 46 std::string extension_path_; |
48 | 47 |
49 // Path to private key file, or null if none specified | 48 // Path to private key file, or null if none specified |
50 std::string private_key_path_; | 49 std::string private_key_path_; |
51 | 50 |
52 DISALLOW_COPY_AND_ASSIGN(PackExtensionHandler); | 51 DISALLOW_COPY_AND_ASSIGN(PackExtensionHandler); |
53 }; | 52 }; |
54 | 53 |
55 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_PACK_EXTENSION_HANDLER_H_ | 54 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_PACK_EXTENSION_HANDLER_H_ |
OLD | NEW |