Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ERROR_HANDLER_H_ | |
| 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ERROR_HANDLER_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "base/strings/string16.h" | |
| 10 #include "content/public/browser/web_ui_message_handler.h" | |
| 11 | |
| 12 namespace base { | |
| 13 class ListValue; | |
| 14 class DictionaryValue; | |
| 15 } | |
| 16 | |
| 17 namespace content { | |
| 18 class WebUIDataSource; | |
| 19 } | |
| 20 | |
| 21 class Profile; | |
| 22 | |
| 23 namespace extensions { | |
| 24 class Extension; | |
| 25 | |
| 26 // The handler page for the Extension Commands UI overlay. | |
| 27 class ExtensionErrorHandler : public content::WebUIMessageHandler { | |
| 28 public: | |
| 29 explicit ExtensionErrorHandler(Profile* profile); | |
| 30 virtual ~ExtensionErrorHandler(); | |
| 31 | |
| 32 // Fetches the localized values for the page and deposits them into |source|. | |
| 33 void GetLocalizedValues(content::WebUIDataSource* source); | |
| 34 | |
| 35 // WebUIMessageHandler implementation. | |
| 36 virtual void RegisterMessages() OVERRIDE; | |
| 37 | |
| 38 private: | |
| 39 // Handle the "requestFileSource" call. | |
|
Yoyo Zhou
2013/08/16 00:17:25
Seems like this should have a name pertaining to m
Devlin
2013/08/16 23:56:54
It's in preparation for the more-generic call for
Yoyo Zhou
2013/08/19 20:39:46
Ok, it just seems incongruous to have this generic
| |
| 40 void HandleRequestFileSource(const base::ListValue* args); | |
| 41 | |
| 42 // Populate the results for a manifest file's content in response to the | |
| 43 // "requestFileSource" call. Highlight the part of the manifest which | |
| 44 // corresponds to the given |key| and |specific| locations. | |
| 45 void GetManifestFileCallback(base::DictionaryValue* dict, | |
| 46 const std::string& key, | |
| 47 const std::string& specific, | |
| 48 std::string* contents); | |
| 49 | |
| 50 // The profile with which this Handler is associated. | |
| 51 Profile* profile_; | |
| 52 | |
| 53 DISALLOW_COPY_AND_ASSIGN(ExtensionErrorHandler); | |
| 54 }; | |
| 55 | |
| 56 } // namespace extensions | |
| 57 | |
| 58 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ERROR_HANDLER_H_ | |
| OLD | NEW |