Chromium Code Reviews| Index: chrome/browser/ui/webui/extensions/extension_error_handler.h |
| diff --git a/chrome/browser/ui/webui/extensions/extension_error_handler.h b/chrome/browser/ui/webui/extensions/extension_error_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f7af64feb11fe555544472caeee98f9c044fb005 |
| --- /dev/null |
| +++ b/chrome/browser/ui/webui/extensions/extension_error_handler.h |
| @@ -0,0 +1,58 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ERROR_HANDLER_H_ |
| +#define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ERROR_HANDLER_H_ |
| + |
| +#include "base/compiler_specific.h" |
| +#include "base/strings/string16.h" |
| +#include "content/public/browser/web_ui_message_handler.h" |
| + |
| +namespace base { |
| +class ListValue; |
| +class DictionaryValue; |
| +} |
| + |
| +namespace content { |
| +class WebUIDataSource; |
| +} |
| + |
| +class Profile; |
| + |
| +namespace extensions { |
| +class Extension; |
| + |
| +// The handler page for the Extension Commands UI overlay. |
| +class ExtensionErrorHandler : public content::WebUIMessageHandler { |
| + public: |
| + explicit ExtensionErrorHandler(Profile* profile); |
| + virtual ~ExtensionErrorHandler(); |
| + |
| + // Fetches the localized values for the page and deposits them into |source|. |
| + void GetLocalizedValues(content::WebUIDataSource* source); |
| + |
| + // WebUIMessageHandler implementation. |
| + virtual void RegisterMessages() OVERRIDE; |
| + |
| + private: |
| + // 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
|
| + void HandleRequestFileSource(const base::ListValue* args); |
| + |
| + // Populate the results for a manifest file's content in response to the |
| + // "requestFileSource" call. Highlight the part of the manifest which |
| + // corresponds to the given |key| and |specific| locations. |
| + void GetManifestFileCallback(base::DictionaryValue* dict, |
| + const std::string& key, |
| + const std::string& specific, |
| + std::string* contents); |
| + |
| + // The profile with which this Handler is associated. |
| + Profile* profile_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ExtensionErrorHandler); |
| +}; |
| + |
| +} // namespace extensions |
| + |
| +#endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ERROR_HANDLER_H_ |