Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5784)

Unified Diff: chrome/browser/ui/webui/extensions/extension_commands_handler.h

Issue 10383240: This adds a webui overlay on the extensions page for showing what Extension keybindings are active.… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/extensions/extension_commands_handler.h
===================================================================
--- chrome/browser/ui/webui/extensions/extension_commands_handler.h (revision 0)
+++ chrome/browser/ui/webui/extensions/extension_commands_handler.h (revision 0)
@@ -0,0 +1,54 @@
+// Copyright (c) 2012 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_COMMANDS_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_COMMANDS_HANDLER_H_
+#pragma once
+
+#include "base/compiler_specific.h"
+#include "content/public/browser/web_ui_message_handler.h"
+
+namespace base {
+class DictionaryValue;
+class ListValue;
+}
+
+namespace extensions {
+class Command;
+class ExtensionCommandService;
+}
+
+class Extension;
+
+namespace extensions {
+
+// The handler page for the Extension Commands UI overlay.
+class ExtensionCommandsHandler : public content::WebUIMessageHandler {
+ public:
+ ExtensionCommandsHandler();
+ virtual ~ExtensionCommandsHandler();
+
+ // Fetches the localized values for the page and deposits them into
+ // |localized_strings|.
+ void GetLocalizedValues(base::DictionaryValue* localized_strings);
+
+ // WebUIMessageHandler implementation.
+ virtual void RegisterMessages() OVERRIDE;
+
+ private:
+ // Handles requests from javascript to fetch the extensions data, including
+ // the commands it contains.
+ // Replies back through: ExtensionCommandsOverlay.returnExtensionsData.
+ void HandleRequestExtensionsData(const base::ListValue* args);
+
+ // Fetches all known commands, active and inactive and returns them through
+ // |commands|.
+ void GetAllCommands(base::DictionaryValue* commands);
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionCommandsHandler);
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_COMMANDS_HANDLER_H_
Property changes on: chrome\browser\ui\webui\extensions\extension_commands_handler.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698