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 <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/compiler_specific.h" | |
| 12 #include "content/public/browser/web_ui_message_handler.h" | |
| 13 | |
| 14 namespace base { | |
| 15 class DictionaryValue; | |
| 16 class ListValue; | |
| 17 } | |
| 18 | |
| 19 namespace content { | |
| 20 class WebUIDataSource; | |
| 21 } | |
| 22 | |
| 23 class Profile; | |
| 24 | |
| 25 namespace extensions { | |
| 26 | |
| 27 class Extension; | |
| 28 | |
| 29 // The handler page for the Extension Commands UI overlay. | |
| 30 class ExtensionErrorHandler : public content::WebUIMessageHandler { | |
| 31 public: | |
| 32 explicit ExtensionErrorHandler(Profile* profile); | |
| 33 virtual ~ExtensionErrorHandler(); | |
| 34 | |
| 35 // Fetches the localized values for the page and deposits them into |source|. | |
| 36 void GetLocalizedValues(content::WebUIDataSource* source); | |
| 37 | |
| 38 // WebUIMessageHandler implementation. | |
| 39 virtual void RegisterMessages() OVERRIDE; | |
| 40 | |
| 41 private: | |
| 42 friend class ManifestHighlightUnitTest; | |
| 43 | |
| 44 // Handle the "requestFileSource" call. | |
| 45 void HandleRequestFileSource(const base::ListValue* args); | |
| 46 | |
| 47 // Populate the results for a manifest file's content in response to the | |
| 48 // "requestFileSource" call. Highlight the part of the manifest which | |
| 49 // corresponds to the given |key| and |specific| locations. | |
|
Dan Beam
2013/08/29 00:24:30
nit: mention ownership model of |dict| and |conten
Devlin
2013/08/29 21:02:04
Done.
| |
| 50 void GetManifestFileCallback(base::DictionaryValue* dict, | |
| 51 const std::string& key, | |
| 52 const std::string& specific, | |
| 53 std::string* contents); | |
| 54 | |
| 55 // The profile with which this Handler is associated. | |
| 56 Profile* profile_; | |
| 57 | |
| 58 DISALLOW_COPY_AND_ASSIGN(ExtensionErrorHandler); | |
| 59 }; | |
| 60 | |
| 61 } // namespace extensions | |
| 62 | |
| 63 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ERROR_HANDLER_H_ | |
| OLD | NEW |