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

Side by Side Diff: webkit/glue/devtools/debugger_agent_impl.cc

Issue 193072: Move StringPiece into the base namespace. It is colliding (Closed)
Patch Set: take 2 Created 11 years, 3 months 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
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | webkit/glue/webkit_glue.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 #include "config.h" 5 #include "config.h"
6 6
7 #include <wtf/HashSet.h> 7 #include <wtf/HashSet.h>
8 #include <wtf/RefPtr.h> 8 #include <wtf/RefPtr.h>
9 #include <wtf/Vector.h> 9 #include <wtf/Vector.h>
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 v8::Handle<v8::Object> global = (*context)->Global(); 125 v8::Handle<v8::Object> global = (*context)->Global();
126 126
127 v8::Handle<v8::String> implicit_proto_string = v8::String::New("__proto__"); 127 v8::Handle<v8::String> implicit_proto_string = v8::String::New("__proto__");
128 global->Set(implicit_proto_string, window_wrapper); 128 global->Set(implicit_proto_string, window_wrapper);
129 129
130 // Give the code running in the new context a way to get access to the 130 // Give the code running in the new context a way to get access to the
131 // original context. 131 // original context.
132 global->Set(v8::String::New("contentWindow"), window_global); 132 global->Set(v8::String::New("contentWindow"), window_global);
133 133
134 // Inject javascript into the context. 134 // Inject javascript into the context.
135 StringPiece basejs = webkit_glue::GetDataResource(IDR_DEVTOOLS_BASE_JS); 135 base::StringPiece basejs = webkit_glue::GetDataResource(IDR_DEVTOOLS_BASE_JS);
136 v8::Script::Compile(v8::String::New(basejs.as_string().c_str()))->Run(); 136 v8::Script::Compile(v8::String::New(basejs.as_string().c_str()))->Run();
137 137
138 StringPiece injectjs_webkit = 138 base::StringPiece injectjs_webkit =
139 webkit_glue::GetDataResource(IDR_DEVTOOLS_INJECT_WEBKIT_JS); 139 webkit_glue::GetDataResource(IDR_DEVTOOLS_INJECT_WEBKIT_JS);
140 v8::Script::Compile( 140 v8::Script::Compile(
141 v8::String::New(injectjs_webkit.as_string().c_str()))->Run(); 141 v8::String::New(injectjs_webkit.as_string().c_str()))->Run();
142 142
143 StringPiece injectjs = webkit_glue::GetDataResource(IDR_DEVTOOLS_INJECT_JS); 143 base::StringPiece injectjs = webkit_glue::GetDataResource(
144 IDR_DEVTOOLS_INJECT_JS);
144 v8::Script::Compile(v8::String::New(injectjs.as_string().c_str()))->Run(); 145 v8::Script::Compile(v8::String::New(injectjs.as_string().c_str()))->Run();
145 146
146 StringPiece inject_dispatchjs = webkit_glue::GetDataResource( 147 base::StringPiece inject_dispatchjs = webkit_glue::GetDataResource(
147 IDR_DEVTOOLS_INJECT_DISPATCH_JS); 148 IDR_DEVTOOLS_INJECT_DISPATCH_JS);
148 v8::Script::Compile(v8::String::New( 149 v8::Script::Compile(v8::String::New(
149 inject_dispatchjs.as_string().c_str()))->Run(); 150 inject_dispatchjs.as_string().c_str()))->Run();
150 } 151 }
151 152
152 String DebuggerAgentImpl::ExecuteUtilityFunction( 153 String DebuggerAgentImpl::ExecuteUtilityFunction(
153 v8::Handle<v8::Context> context, 154 v8::Handle<v8::Context> context,
154 const String &function_name, 155 const String &function_name,
155 const String& json_args, 156 const String& json_args,
156 String* exception) { 157 String* exception) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 ASSERT(function->IsFunction()); 200 ASSERT(function->IsFunction());
200 v8::Handle<v8::Value> args[] = { 201 v8::Handle<v8::Value> args[] = {
201 v8::Local<v8::Value>() 202 v8::Local<v8::Value>()
202 }; 203 };
203 v8::Handle<v8::Function>::Cast(function)->Call(context->Global(), 0, args); 204 v8::Handle<v8::Function>::Cast(function)->Call(context->Global(), 0, args);
204 } 205 }
205 206
206 WebCore::Page* DebuggerAgentImpl::GetPage() { 207 WebCore::Page* DebuggerAgentImpl::GetPage() {
207 return web_view_impl_->page(); 208 return web_view_impl_->page();
208 } 209 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | webkit/glue/webkit_glue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698