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

Side by Side Diff: chrome/common/extensions/api/commands/commands_handler.h

Issue 12084034: Change manifest handler interface to always (implicitly) pass the entire manifest to handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tts, TODO Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_COMMON_EXTENSIONS_API_COMMANDS_COMMANDS_HANDLER_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_API_COMMANDS_COMMANDS_HANDLER_H_
6 #define CHROME_COMMON_EXTENSIONS_API_COMMANDS_COMMANDS_HANDLER_H_ 6 #define CHROME_COMMON_EXTENSIONS_API_COMMANDS_COMMANDS_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 21 matching lines...) Expand all
32 static const Command* GetScriptBadgeCommand(const Extension* extension); 32 static const Command* GetScriptBadgeCommand(const Extension* extension);
33 static const CommandMap* GetNamedCommands(const Extension* extension); 33 static const CommandMap* GetNamedCommands(const Extension* extension);
34 }; 34 };
35 35
36 // Parses the "commands" manifest key. 36 // Parses the "commands" manifest key.
37 class CommandsHandler : public ManifestHandler { 37 class CommandsHandler : public ManifestHandler {
38 public: 38 public:
39 CommandsHandler(); 39 CommandsHandler();
40 virtual ~CommandsHandler(); 40 virtual ~CommandsHandler();
41 41
42 virtual bool Parse(const base::Value* value, 42 virtual bool Parse(Extension* extension, string16* error) OVERRIDE;
43 Extension* extension, 43 virtual bool AlwaysParseForType(Extension::Type type) OVERRIDE;
44 string16* error) OVERRIDE;
45
46 virtual bool HasNoKey(Extension* extension, string16* error) OVERRIDE;
47 44
48 private: 45 private:
49 // If the extension defines a browser action, but no command for it, then 46 // If the extension defines a browser action, but no command for it, then
50 // we synthesize a generic one, so the user can configure a shortcut for it. 47 // we synthesize a generic one, so the user can configure a shortcut for it.
51 // No keyboard shortcut will be assigned to it, until the user selects one. 48 // No keyboard shortcut will be assigned to it, until the user selects one.
52 void MaybeSetBrowserActionDefault(const Extension* extension, 49 void MaybeSetBrowserActionDefault(const Extension* extension,
53 CommandsInfo* info); 50 CommandsInfo* info);
54 }; 51 };
55 52
56 } // namespace extensions 53 } // namespace extensions
57 54
58 #endif // CHROME_COMMON_EXTENSIONS_API_COMMANDS_COMMANDS_HANDLER_H_ 55 #endif // CHROME_COMMON_EXTENSIONS_API_COMMANDS_COMMANDS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_browser_handler.cc ('k') | chrome/common/extensions/api/commands/commands_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698