| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/renderer/render_view.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 3466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3477 ListValue list; | 3477 ListValue list; |
| 3478 if (!result.IsEmpty() && web_frame) { | 3478 if (!result.IsEmpty() && web_frame) { |
| 3479 v8::HandleScope handle_scope; | 3479 v8::HandleScope handle_scope; |
| 3480 v8::Local<v8::Context> context = web_frame->mainWorldScriptContext(); | 3480 v8::Local<v8::Context> context = web_frame->mainWorldScriptContext(); |
| 3481 v8::Context::Scope context_scope(context); | 3481 v8::Context::Scope context_scope(context); |
| 3482 V8ValueConverter converter; | 3482 V8ValueConverter converter; |
| 3483 converter.set_allow_date(true); | 3483 converter.set_allow_date(true); |
| 3484 converter.set_allow_regexp(true); | 3484 converter.set_allow_regexp(true); |
| 3485 list.Set(0, converter.FromV8Value(result, context)); | 3485 list.Set(0, converter.FromV8Value(result, context)); |
| 3486 } else { | 3486 } else { |
| 3487 list.Set(0, Value::CreateNullValue()); | 3487 list.Set(0, base::NullValue()); |
| 3488 } | 3488 } |
| 3489 Send(new ViewHostMsg_ScriptEvalResponse(routing_id_, id, list)); | 3489 Send(new ViewHostMsg_ScriptEvalResponse(routing_id_, id, list)); |
| 3490 } | 3490 } |
| 3491 } | 3491 } |
| 3492 | 3492 |
| 3493 void RenderView::OnScriptEvalRequest(const string16& frame_xpath, | 3493 void RenderView::OnScriptEvalRequest(const string16& frame_xpath, |
| 3494 const string16& jscript, | 3494 const string16& jscript, |
| 3495 int id, | 3495 int id, |
| 3496 bool notify_result) { | 3496 bool notify_result) { |
| 3497 EvaluateScript(frame_xpath, jscript, id, notify_result); | 3497 EvaluateScript(frame_xpath, jscript, id, notify_result); |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4529 } | 4529 } |
| 4530 #endif | 4530 #endif |
| 4531 | 4531 |
| 4532 void RenderView::OnContextMenuClosed( | 4532 void RenderView::OnContextMenuClosed( |
| 4533 const webkit_glue::CustomContextMenuContext& custom_context) { | 4533 const webkit_glue::CustomContextMenuContext& custom_context) { |
| 4534 if (custom_context.is_pepper_menu) | 4534 if (custom_context.is_pepper_menu) |
| 4535 pepper_delegate_.OnContextMenuClosed(custom_context); | 4535 pepper_delegate_.OnContextMenuClosed(custom_context); |
| 4536 else | 4536 else |
| 4537 context_menu_node_.reset(); | 4537 context_menu_node_.reset(); |
| 4538 } | 4538 } |
| OLD | NEW |