| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 virtual void ResetZoom() = 0; | 68 virtual void ResetZoom() = 0; |
| 69 virtual void SetDevicesUpdatesEnabled(bool enabled) = 0; | 69 virtual void SetDevicesUpdatesEnabled(bool enabled) = 0; |
| 70 virtual void SetDevicesDiscoveryConfig( | 70 virtual void SetDevicesDiscoveryConfig( |
| 71 bool discover_usb_devices, | 71 bool discover_usb_devices, |
| 72 bool port_forwarding_enabled, | 72 bool port_forwarding_enabled, |
| 73 const std::string& port_forwarding_config) = 0; | 73 const std::string& port_forwarding_config) = 0; |
| 74 virtual void PerformActionOnRemotePage(const std::string& page_id, | 74 virtual void PerformActionOnRemotePage(const std::string& page_id, |
| 75 const std::string& action) = 0; | 75 const std::string& action) = 0; |
| 76 virtual void OpenRemotePage(const std::string& browser_id, | 76 virtual void OpenRemotePage(const std::string& browser_id, |
| 77 const std::string& url) = 0; | 77 const std::string& url) = 0; |
| 78 virtual void OpenNodeFrontend() = 0; |
| 78 virtual void GetPreferences(const DispatchCallback& callback) = 0; | 79 virtual void GetPreferences(const DispatchCallback& callback) = 0; |
| 79 virtual void SetPreference(const std::string& name, | 80 virtual void SetPreference(const std::string& name, |
| 80 const std::string& value) = 0; | 81 const std::string& value) = 0; |
| 81 virtual void RemovePreference(const std::string& name) = 0; | 82 virtual void RemovePreference(const std::string& name) = 0; |
| 82 virtual void ClearPreferences() = 0; | 83 virtual void ClearPreferences() = 0; |
| 83 virtual void DispatchProtocolMessageFromDevToolsFrontend( | 84 virtual void DispatchProtocolMessageFromDevToolsFrontend( |
| 84 const std::string& message) = 0; | 85 const std::string& message) = 0; |
| 85 virtual void RecordEnumeratedHistogram(const std::string& name, | 86 virtual void RecordEnumeratedHistogram(const std::string& name, |
| 86 int sample, | 87 int sample, |
| 87 int boundary_value) = 0; | 88 int boundary_value) = 0; |
| 88 virtual void SendJsonRequest(const DispatchCallback& callback, | 89 virtual void SendJsonRequest(const DispatchCallback& callback, |
| 89 const std::string& browser_id, | 90 const std::string& browser_id, |
| 90 const std::string& url) = 0; | 91 const std::string& url) = 0; |
| 91 virtual void Reattach(const DispatchCallback& callback) = 0; | 92 virtual void Reattach(const DispatchCallback& callback) = 0; |
| 92 virtual void ReadyForTest() = 0; | 93 virtual void ReadyForTest() = 0; |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 using DispatchCallback = Delegate::DispatchCallback; | 96 using DispatchCallback = Delegate::DispatchCallback; |
| 96 | 97 |
| 97 virtual ~DevToolsEmbedderMessageDispatcher() {} | 98 virtual ~DevToolsEmbedderMessageDispatcher() {} |
| 98 virtual bool Dispatch(const DispatchCallback& callback, | 99 virtual bool Dispatch(const DispatchCallback& callback, |
| 99 const std::string& method, | 100 const std::string& method, |
| 100 const base::ListValue* params) = 0; | 101 const base::ListValue* params) = 0; |
| 101 | 102 |
| 102 static DevToolsEmbedderMessageDispatcher* CreateForDevToolsFrontend( | 103 static DevToolsEmbedderMessageDispatcher* CreateForDevToolsFrontend( |
| 103 Delegate* delegate); | 104 Delegate* delegate); |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_EMBEDDER_MESSAGE_DISPATCHER_H_ | 107 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_EMBEDDER_MESSAGE_DISPATCHER_H_ |
| OLD | NEW |