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

Side by Side Diff: webkit/glue/devtools/devtools_rpc_js.h

Issue 330029: DevTools: Remove base/ dependencies from glue/devtools (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « webkit/glue/devtools/devtools_rpc.h ('k') | webkit/glue/webdevtoolsagent_impl.h » ('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 (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 // Do not remove this one although it is not used. 10 // Do not remove this one although it is not used.
11 #include <wtf/Noncopyable.h>
11 #include <wtf/OwnPtr.h> 12 #include <wtf/OwnPtr.h>
12 13
13 #include "base/basictypes.h"
14 #include "webkit/api/public/WebFrame.h" 14 #include "webkit/api/public/WebFrame.h"
15 #include "webkit/glue/devtools/bound_object.h" 15 #include "webkit/glue/devtools/bound_object.h"
16 #include "webkit/glue/devtools/devtools_rpc.h" 16 #include "webkit/glue/devtools/devtools_rpc.h"
17 #include "webkit/glue/glue_util.h" 17 #include "webkit/glue/glue_util.h"
18 18
19 /////////////////////////////////////////////////////// 19 ///////////////////////////////////////////////////////
20 // JS RPC binds and stubs 20 // JS RPC binds and stubs
21 21
22 #define TOOLS_RPC_JS_BIND_METHOD0(Method) \ 22 #define TOOLS_RPC_JS_BIND_METHOD0(Method) \
23 bound_obj_->AddProtoFunction(#Method, OCLASS::Js##Method); 23 bound_obj_->AddProtoFunction(#Method, OCLASS::Js##Method);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 WebCore::toWebCoreStringWithNullCheck(args[0]), \ 63 WebCore::toWebCoreStringWithNullCheck(args[0]), \
64 WebCore::toWebCoreStringWithNullCheck(args[1]), \ 64 WebCore::toWebCoreStringWithNullCheck(args[1]), \
65 WebCore::toWebCoreStringWithNullCheck(args[2])); \ 65 WebCore::toWebCoreStringWithNullCheck(args[2])); \
66 return v8::Undefined(); \ 66 return v8::Undefined(); \
67 } 67 }
68 68
69 /////////////////////////////////////////////////////// 69 ///////////////////////////////////////////////////////
70 // JS RPC main obj macro 70 // JS RPC main obj macro
71 71
72 #define DEFINE_RPC_JS_BOUND_OBJ(Class, STRUCT, DClass, DELEGATE_STRUCT) \ 72 #define DEFINE_RPC_JS_BOUND_OBJ(Class, STRUCT, DClass, DELEGATE_STRUCT) \
73 class Js##Class##BoundObj : public Class##Stub { \ 73 class Js##Class##BoundObj : public Class##Stub, public Noncopyable { \
74 public: \ 74 public: \
75 Js##Class##BoundObj(Delegate* rpc_delegate, \ 75 Js##Class##BoundObj(Delegate* rpc_delegate, \
76 v8::Handle<v8::Context> context, \ 76 v8::Handle<v8::Context> context, \
77 const char* classname) \ 77 const char* classname) \
78 : Class##Stub(rpc_delegate) { \ 78 : Class##Stub(rpc_delegate) { \
79 bound_obj_.set(new BoundObject(context, this, classname)); \ 79 bound_obj_.set(new BoundObject(context, this, classname)); \
80 STRUCT( \ 80 STRUCT( \
81 TOOLS_RPC_JS_BIND_METHOD0, \ 81 TOOLS_RPC_JS_BIND_METHOD0, \
82 TOOLS_RPC_JS_BIND_METHOD1, \ 82 TOOLS_RPC_JS_BIND_METHOD1, \
83 TOOLS_RPC_JS_BIND_METHOD2, \ 83 TOOLS_RPC_JS_BIND_METHOD2, \
(...skipping 15 matching lines...) Expand all
99 const String& param3) { \ 99 const String& param3) { \
100 Js##Class##BoundObj* self = static_cast<Js##Class##BoundObj*>(self_ptr); \ 100 Js##Class##BoundObj* self = static_cast<Js##Class##BoundObj*>(self_ptr); \
101 self->delegate_->SendRpcMessage( \ 101 self->delegate_->SendRpcMessage( \
102 #Class, \ 102 #Class, \
103 method, \ 103 method, \
104 param1, \ 104 param1, \
105 param2, \ 105 param2, \
106 param3); \ 106 param3); \
107 } \ 107 } \
108 OwnPtr<BoundObject> bound_obj_; \ 108 OwnPtr<BoundObject> bound_obj_; \
109 DISALLOW_COPY_AND_ASSIGN(Js##Class##BoundObj); \
110 }; 109 };
111 110
112 #endif // WEBKIT_GLUE_DEVTOOLS_DEVTOOLS_RPC_JS_H_ 111 #endif // WEBKIT_GLUE_DEVTOOLS_DEVTOOLS_RPC_JS_H_
OLDNEW
« no previous file with comments | « webkit/glue/devtools/devtools_rpc.h ('k') | webkit/glue/webdevtoolsagent_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698