| OLD | NEW |
| 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 3658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3669 WebFrame* web_frame = GetChildFrame(frame_xpath); | 3669 WebFrame* web_frame = GetChildFrame(frame_xpath); |
| 3670 if (web_frame) | 3670 if (web_frame) |
| 3671 result = web_frame->executeScriptAndReturnValue(WebScriptSource(jscript)); | 3671 result = web_frame->executeScriptAndReturnValue(WebScriptSource(jscript)); |
| 3672 if (notify_result) { | 3672 if (notify_result) { |
| 3673 ListValue list; | 3673 ListValue list; |
| 3674 if (!result.IsEmpty() && web_frame) { | 3674 if (!result.IsEmpty() && web_frame) { |
| 3675 v8::HandleScope handle_scope; | 3675 v8::HandleScope handle_scope; |
| 3676 v8::Local<v8::Context> context = web_frame->mainWorldScriptContext(); | 3676 v8::Local<v8::Context> context = web_frame->mainWorldScriptContext(); |
| 3677 v8::Context::Scope context_scope(context); | 3677 v8::Context::Scope context_scope(context); |
| 3678 V8ValueConverterImpl converter; | 3678 V8ValueConverterImpl converter; |
| 3679 converter.set_allow_date(true); | 3679 converter.SetDateAllowed(true); |
| 3680 converter.set_allow_regexp(true); | 3680 converter.SetRegexpAllowed(true); |
| 3681 list.Set(0, converter.FromV8Value(result, context)); | 3681 list.Set(0, converter.FromV8Value(result, context)); |
| 3682 } else { | 3682 } else { |
| 3683 list.Set(0, Value::CreateNullValue()); | 3683 list.Set(0, Value::CreateNullValue()); |
| 3684 } | 3684 } |
| 3685 Send(new ViewHostMsg_ScriptEvalResponse(routing_id_, id, list)); | 3685 Send(new ViewHostMsg_ScriptEvalResponse(routing_id_, id, list)); |
| 3686 } | 3686 } |
| 3687 } | 3687 } |
| 3688 | 3688 |
| 3689 bool RenderViewImpl::ShouldDisplayScrollbars(int width, int height) const { | 3689 bool RenderViewImpl::ShouldDisplayScrollbars(int width, int height) const { |
| 3690 return (!send_preferred_size_changes_ || | 3690 return (!send_preferred_size_changes_ || |
| (...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5391 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5391 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5392 return !!RenderThreadImpl::current()->compositor_thread(); | 5392 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5393 } | 5393 } |
| 5394 | 5394 |
| 5395 void RenderViewImpl::OnJavaBridgeInit() { | 5395 void RenderViewImpl::OnJavaBridgeInit() { |
| 5396 DCHECK(!java_bridge_dispatcher_); | 5396 DCHECK(!java_bridge_dispatcher_); |
| 5397 #if defined(ENABLE_JAVA_BRIDGE) | 5397 #if defined(ENABLE_JAVA_BRIDGE) |
| 5398 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5398 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5399 #endif | 5399 #endif |
| 5400 } | 5400 } |
| OLD | NEW |