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 | |
|
Dan Beam
2013/08/20 21:39:26
#include <string>
#include "base/basictypes.h"
Devlin
2013/08/20 23:06:51
Done.
| |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "base/strings/string16.h" | |
|
Dan Beam
2013/08/20 21:39:26
^ unused
Devlin
2013/08/20 23:06:51
Done.
| |
| 10 #include "content/public/browser/web_ui_message_handler.h" | |
| 11 | |
| 12 namespace base { | |
| 13 class ListValue; | |
| 14 class DictionaryValue; | |
|
Dan Beam
2013/08/20 21:39:26
nit: alpha
Devlin
2013/08/20 23:06:51
Done.
| |
| 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 friend class ManifestHighlightUnitTest; | |
| 40 | |
| 41 // Handle the "requestFileSource" call. | |
| 42 void HandleRequestFileSource(const base::ListValue* args); | |
| 43 | |
| 44 // Populate the results for a manifest file's content in response to the | |
| 45 // "requestFileSource" call. Highlight the part of the manifest which | |
| 46 // corresponds to the given |key| and |specific| locations. | |
| 47 void GetManifestFileCallback(base::DictionaryValue* dict, | |
| 48 const std::string& key, | |
| 49 const std::string& specific, | |
| 50 std::string* contents); | |
| 51 | |
| 52 // The profile with which this Handler is associated. | |
| 53 Profile* profile_; | |
| 54 | |
| 55 DISALLOW_COPY_AND_ASSIGN(ExtensionErrorHandler); | |
| 56 }; | |
| 57 | |
| 58 } // namespace extensions | |
| 59 | |
| 60 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ERROR_HANDLER_H_ | |
| OLD | NEW |