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

Side by Side Diff: extensions/browser/api/test/test_api.h

Issue 257333002: Drive extension functions from ExtensionFunction::Run. The (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « extensions/browser/api/storage/storage_api.cc ('k') | extensions/browser/api/test/test_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_TEST_TEST_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_TEST_TEST_API_H_
6 #define EXTENSIONS_BROWSER_API_TEST_TEST_API_H_ 6 #define EXTENSIONS_BROWSER_API_TEST_TEST_API_H_
7 7
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "extensions/browser/extension_function.h" 9 #include "extensions/browser/extension_function.h"
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 DECLARE_EXTENSION_FUNCTION("test.sendMessage", UNKNOWN) 74 DECLARE_EXTENSION_FUNCTION("test.sendMessage", UNKNOWN)
75 75
76 // Sends a reply back to the calling extension. Many extensions don't need 76 // Sends a reply back to the calling extension. Many extensions don't need
77 // a reply and will just ignore it. 77 // a reply and will just ignore it.
78 void Reply(const std::string& message); 78 void Reply(const std::string& message);
79 79
80 protected: 80 protected:
81 virtual ~TestSendMessageFunction(); 81 virtual ~TestSendMessageFunction();
82 82
83 // ExtensionFunction: 83 // ExtensionFunction:
84 virtual bool RunImpl() OVERRIDE; 84 virtual bool RunAsync() OVERRIDE;
85 }; 85 };
86 86
87 class TestGetConfigFunction : public TestExtensionFunction { 87 class TestGetConfigFunction : public TestExtensionFunction {
88 public: 88 public:
89 DECLARE_EXTENSION_FUNCTION("test.getConfig", UNKNOWN) 89 DECLARE_EXTENSION_FUNCTION("test.getConfig", UNKNOWN)
90 90
91 // Set the dictionary returned by chrome.test.getConfig(). 91 // Set the dictionary returned by chrome.test.getConfig().
92 // Does not take ownership of |value|. 92 // Does not take ownership of |value|.
93 static void set_test_config_state(base::DictionaryValue* value); 93 static void set_test_config_state(base::DictionaryValue* value);
94 94
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 protected: 129 protected:
130 virtual ~TestWaitForRoundTripFunction(); 130 virtual ~TestWaitForRoundTripFunction();
131 131
132 // TestExtensionFunction: 132 // TestExtensionFunction:
133 virtual bool RunSafe() OVERRIDE; 133 virtual bool RunSafe() OVERRIDE;
134 }; 134 };
135 135
136 } // namespace extensions 136 } // namespace extensions
137 137
138 #endif // EXTENSIONS_BROWSER_API_TEST_TEST_API_H_ 138 #endif // EXTENSIONS_BROWSER_API_TEST_TEST_API_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/storage/storage_api.cc ('k') | extensions/browser/api/test/test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698