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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10387055: Support optional arguments in SendRequestNatives::StartRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 3618 matching lines...) Expand 10 before | Expand all | Expand 10 after
3629 WebFrame* web_frame = GetChildFrame(frame_xpath); 3629 WebFrame* web_frame = GetChildFrame(frame_xpath);
3630 if (web_frame) 3630 if (web_frame)
3631 result = web_frame->executeScriptAndReturnValue(WebScriptSource(jscript)); 3631 result = web_frame->executeScriptAndReturnValue(WebScriptSource(jscript));
3632 if (notify_result) { 3632 if (notify_result) {
3633 ListValue list; 3633 ListValue list;
3634 if (!result.IsEmpty() && web_frame) { 3634 if (!result.IsEmpty() && web_frame) {
3635 v8::HandleScope handle_scope; 3635 v8::HandleScope handle_scope;
3636 v8::Local<v8::Context> context = web_frame->mainWorldScriptContext(); 3636 v8::Local<v8::Context> context = web_frame->mainWorldScriptContext();
3637 v8::Context::Scope context_scope(context); 3637 v8::Context::Scope context_scope(context);
3638 V8ValueConverterImpl converter; 3638 V8ValueConverterImpl converter;
3639 converter.set_allow_date(true); 3639 converter.SetAllowDate(true);
3640 converter.set_allow_regexp(true); 3640 converter.SetAllowRegexp(true);
3641 list.Set(0, converter.FromV8Value(result, context)); 3641 list.Set(0, converter.FromV8Value(result, context));
3642 } else { 3642 } else {
3643 list.Set(0, Value::CreateNullValue()); 3643 list.Set(0, Value::CreateNullValue());
3644 } 3644 }
3645 Send(new ViewHostMsg_ScriptEvalResponse(routing_id_, id, list)); 3645 Send(new ViewHostMsg_ScriptEvalResponse(routing_id_, id, list));
3646 } 3646 }
3647 } 3647 }
3648 3648
3649 bool RenderViewImpl::ShouldDisplayScrollbars(int width, int height) const { 3649 bool RenderViewImpl::ShouldDisplayScrollbars(int width, int height) const {
3650 return (!send_preferred_size_changes_ || 3650 return (!send_preferred_size_changes_ ||
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after
5306 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5306 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5307 return !!RenderThreadImpl::current()->compositor_thread(); 5307 return !!RenderThreadImpl::current()->compositor_thread();
5308 } 5308 }
5309 5309
5310 void RenderViewImpl::OnJavaBridgeInit() { 5310 void RenderViewImpl::OnJavaBridgeInit() {
5311 DCHECK(!java_bridge_dispatcher_.get()); 5311 DCHECK(!java_bridge_dispatcher_.get());
5312 #if defined(ENABLE_JAVA_BRIDGE) 5312 #if defined(ENABLE_JAVA_BRIDGE)
5313 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 5313 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
5314 #endif 5314 #endif
5315 } 5315 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698