OLD | NEW |
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 "chrome/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1495 } | 1495 } |
1496 | 1496 |
1497 void RenderView::BindDOMAutomationController(WebFrame* webframe) { | 1497 void RenderView::BindDOMAutomationController(WebFrame* webframe) { |
1498 dom_automation_controller_.set_message_sender(this); | 1498 dom_automation_controller_.set_message_sender(this); |
1499 dom_automation_controller_.set_routing_id(routing_id_); | 1499 dom_automation_controller_.set_routing_id(routing_id_); |
1500 dom_automation_controller_.BindToJavascript(webframe, | 1500 dom_automation_controller_.BindToJavascript(webframe, |
1501 L"domAutomationController"); | 1501 L"domAutomationController"); |
1502 } | 1502 } |
1503 | 1503 |
1504 void RenderView::WindowObjectCleared(WebFrame* webframe) { | 1504 void RenderView::WindowObjectCleared(WebFrame* webframe) { |
1505 external_js_object_.set_render_view(this); | |
1506 external_js_object_.BindToJavascript(webframe, L"external"); | |
1507 if (BindingsPolicy::is_dom_automation_enabled(enabled_bindings_)) | 1505 if (BindingsPolicy::is_dom_automation_enabled(enabled_bindings_)) |
1508 BindDOMAutomationController(webframe); | 1506 BindDOMAutomationController(webframe); |
1509 if (BindingsPolicy::is_dom_ui_enabled(enabled_bindings_)) { | 1507 if (BindingsPolicy::is_dom_ui_enabled(enabled_bindings_)) { |
1510 dom_ui_bindings_.set_message_sender(this); | 1508 dom_ui_bindings_.set_message_sender(this); |
1511 dom_ui_bindings_.set_routing_id(routing_id_); | 1509 dom_ui_bindings_.set_routing_id(routing_id_); |
1512 dom_ui_bindings_.BindToJavascript(webframe, L"chrome"); | 1510 dom_ui_bindings_.BindToJavascript(webframe, L"chrome"); |
1513 } | 1511 } |
1514 if (BindingsPolicy::is_external_host_enabled(enabled_bindings_)) { | 1512 if (BindingsPolicy::is_external_host_enabled(enabled_bindings_)) { |
1515 external_host_bindings_.set_message_sender(this); | 1513 external_host_bindings_.set_message_sender(this); |
1516 external_host_bindings_.set_routing_id(routing_id_); | 1514 external_host_bindings_.set_routing_id(routing_id_); |
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2999 } | 2997 } |
3000 } | 2998 } |
3001 UMA_HISTOGRAM_TIMES("Renderer.All.StartToFinishDoc", start_to_finish_doc); | 2999 UMA_HISTOGRAM_TIMES("Renderer.All.StartToFinishDoc", start_to_finish_doc); |
3002 UMA_HISTOGRAM_TIMES("Renderer.All.FinishDocToFinish", finish_doc_to_finish); | 3000 UMA_HISTOGRAM_TIMES("Renderer.All.FinishDocToFinish", finish_doc_to_finish); |
3003 UMA_HISTOGRAM_TIMES("Renderer.All.StartToFinish", start_to_finish); | 3001 UMA_HISTOGRAM_TIMES("Renderer.All.StartToFinish", start_to_finish); |
3004 if (start_to_first_layout.ToInternalValue() >= 0) { | 3002 if (start_to_first_layout.ToInternalValue() >= 0) { |
3005 UMA_HISTOGRAM_TIMES( | 3003 UMA_HISTOGRAM_TIMES( |
3006 "Renderer.All.StartToFirstLayout", start_to_first_layout); | 3004 "Renderer.All.StartToFirstLayout", start_to_first_layout); |
3007 } | 3005 } |
3008 } | 3006 } |
OLD | NEW |