OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_BROWSER_DEVTOOLS_DEVTOOLS_EMBEDDER_MESSAGE_DISPATCHER_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_EMBEDDER_MESSAGE_DISPATCHER_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_EMBEDDER_MESSAGE_DISPATCHER_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_EMBEDDER_MESSAGE_DISPATCHER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 virtual void AddFileSystem() = 0; | 41 virtual void AddFileSystem() = 0; |
42 virtual void RemoveFileSystem(const std::string& file_system_path) = 0; | 42 virtual void RemoveFileSystem(const std::string& file_system_path) = 0; |
43 virtual void UpgradeDraggedFileSystemPermissions( | 43 virtual void UpgradeDraggedFileSystemPermissions( |
44 const std::string& file_system_url) = 0; | 44 const std::string& file_system_url) = 0; |
45 virtual void IndexPath(int request_id, | 45 virtual void IndexPath(int request_id, |
46 const std::string& file_system_path) = 0; | 46 const std::string& file_system_path) = 0; |
47 virtual void StopIndexing(int request_id) = 0; | 47 virtual void StopIndexing(int request_id) = 0; |
48 virtual void SearchInPath(int request_id, | 48 virtual void SearchInPath(int request_id, |
49 const std::string& file_system_path, | 49 const std::string& file_system_path, |
50 const std::string& query) = 0; | 50 const std::string& query) = 0; |
| 51 virtual void QueryPowerProfilerServiceStatus() = 0; |
| 52 virtual void StartPowerProfiling() = 0; |
| 53 virtual void StopPowerProfiling() = 0; |
| 54 virtual void SetPowerProfilingResolution(unsigned) = 0; |
51 }; | 55 }; |
52 | 56 |
53 explicit DevToolsEmbedderMessageDispatcher(Delegate* delegate); | 57 explicit DevToolsEmbedderMessageDispatcher(Delegate* delegate); |
54 | 58 |
55 ~DevToolsEmbedderMessageDispatcher(); | 59 ~DevToolsEmbedderMessageDispatcher(); |
56 | 60 |
57 std::string Dispatch(const std::string& method, base::ListValue* params); | 61 std::string Dispatch(const std::string& method, base::ListValue* params); |
58 | 62 |
59 private: | 63 private: |
60 typedef base::Callback<bool(const base::ListValue&)> Handler; | 64 typedef base::Callback<bool(const base::ListValue&)> Handler; |
61 void RegisterHandler(const std::string& method, const Handler& handler); | 65 void RegisterHandler(const std::string& method, const Handler& handler); |
62 | 66 |
63 typedef std::map<std::string, Handler> HandlerMap; | 67 typedef std::map<std::string, Handler> HandlerMap; |
64 HandlerMap handlers_; | 68 HandlerMap handlers_; |
65 }; | 69 }; |
66 | 70 |
67 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_EMBEDDER_MESSAGE_DISPATCHER_H_ | 71 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_EMBEDDER_MESSAGE_DISPATCHER_H_ |
OLD | NEW |