OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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 // Additional set of macros for the JS RPC. | 5 // Additional set of macros for the JS RPC. |
6 | 6 |
7 #ifndef WEBKIT_GLUE_DEVTOOLS_DEVTOOLS_RPC_JS_H_ | 7 #ifndef WEBKIT_GLUE_DEVTOOLS_DEVTOOLS_RPC_JS_H_ |
8 #define WEBKIT_GLUE_DEVTOOLS_DEVTOOLS_RPC_JS_H_ | 8 #define WEBKIT_GLUE_DEVTOOLS_DEVTOOLS_RPC_JS_H_ |
9 | 9 |
10 #include <string> | |
11 | |
12 // Do not remove this one although it is not used. | 10 // Do not remove this one although it is not used. |
13 #include <wtf/OwnPtr.h> | 11 #include <wtf/OwnPtr.h> |
14 | 12 |
15 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
16 #include "webkit/api/public/WebFrame.h" | 14 #include "webkit/api/public/WebFrame.h" |
17 #include "webkit/glue/devtools/bound_object.h" | 15 #include "webkit/glue/devtools/bound_object.h" |
18 #include "webkit/glue/devtools/devtools_rpc.h" | 16 #include "webkit/glue/devtools/devtools_rpc.h" |
19 #include "webkit/glue/glue_util.h" | 17 #include "webkit/glue/glue_util.h" |
20 | 18 |
21 /////////////////////////////////////////////////////// | 19 /////////////////////////////////////////////////////// |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 private: \ | 94 private: \ |
97 static void SendRpcMessage(void* self_ptr, \ | 95 static void SendRpcMessage(void* self_ptr, \ |
98 const char* method, \ | 96 const char* method, \ |
99 const String& param1, \ | 97 const String& param1, \ |
100 const String& param2, \ | 98 const String& param2, \ |
101 const String& param3) { \ | 99 const String& param3) { \ |
102 Js##Class##BoundObj* self = static_cast<Js##Class##BoundObj*>(self_ptr); \ | 100 Js##Class##BoundObj* self = static_cast<Js##Class##BoundObj*>(self_ptr); \ |
103 self->delegate_->SendRpcMessage( \ | 101 self->delegate_->SendRpcMessage( \ |
104 #Class, \ | 102 #Class, \ |
105 method, \ | 103 method, \ |
106 webkit_glue::StringToStdString(param1), \ | 104 param1, \ |
107 webkit_glue::StringToStdString(param2), \ | 105 param2, \ |
108 webkit_glue::StringToStdString(param3)); \ | 106 param3); \ |
109 } \ | 107 } \ |
110 OwnPtr<BoundObject> bound_obj_; \ | 108 OwnPtr<BoundObject> bound_obj_; \ |
111 DISALLOW_COPY_AND_ASSIGN(Js##Class##BoundObj); \ | 109 DISALLOW_COPY_AND_ASSIGN(Js##Class##BoundObj); \ |
112 }; | 110 }; |
113 | 111 |
114 #endif // WEBKIT_GLUE_DEVTOOLS_DEVTOOLS_RPC_JS_H_ | 112 #endif // WEBKIT_GLUE_DEVTOOLS_DEVTOOLS_RPC_JS_H_ |
OLD | NEW |