| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2009 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_EXTENSIONS_EXTENSION_APIS_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_APIS_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 class RenderViewHost; | |
| 11 | |
| 12 // ExtensionAPIHandler is the top-level entry point for extension callbacks | |
| 13 // in the browser process. It lives on the UI thread. | |
| 14 class ExtensionAPIHandler { | |
| 15 public: | |
| 16 ExtensionAPIHandler(RenderViewHost* render_view_host); | |
| 17 | |
| 18 // Handle a request to perform some synchronous API. | |
| 19 // TODO(aa): args should be a Value object. | |
| 20 void HandleRequest(const std::string& name, const std::string& args, | |
| 21 int callback_id); | |
| 22 | |
| 23 private: | |
| 24 // TODO(aa): Once there can be APIs that are asynchronous wrt the browser's UI | |
| 25 // thread, we may have to have to do something about this raw pointer. | |
| 26 RenderViewHost* render_view_host_; | |
| 27 }; | |
| 28 | |
| 29 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APIS_H_ | |
| OLD | NEW |