| 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 17 matching lines...) Expand all Loading... |
| 28 #include "chrome/common/jstemplate_builder.h" | 28 #include "chrome/common/jstemplate_builder.h" |
| 29 #include "chrome/common/page_zoom.h" | 29 #include "chrome/common/page_zoom.h" |
| 30 #include "chrome/common/render_messages.h" | 30 #include "chrome/common/render_messages.h" |
| 31 #include "chrome/common/renderer_preferences.h" | 31 #include "chrome/common/renderer_preferences.h" |
| 32 #include "chrome/common/thumbnail_score.h" | 32 #include "chrome/common/thumbnail_score.h" |
| 33 #include "chrome/common/url_constants.h" | 33 #include "chrome/common/url_constants.h" |
| 34 #include "chrome/renderer/about_handler.h" | 34 #include "chrome/renderer/about_handler.h" |
| 35 #include "chrome/renderer/audio_message_filter.h" | 35 #include "chrome/renderer/audio_message_filter.h" |
| 36 #include "chrome/renderer/devtools_agent.h" | 36 #include "chrome/renderer/devtools_agent.h" |
| 37 #include "chrome/renderer/devtools_client.h" | 37 #include "chrome/renderer/devtools_client.h" |
| 38 #include "chrome/renderer/extensions/event_bindings.h" |
| 38 #include "chrome/renderer/extensions/extension_process_bindings.h" | 39 #include "chrome/renderer/extensions/extension_process_bindings.h" |
| 39 #include "chrome/renderer/localized_error.h" | 40 #include "chrome/renderer/localized_error.h" |
| 40 #include "chrome/renderer/media/audio_renderer_impl.h" | 41 #include "chrome/renderer/media/audio_renderer_impl.h" |
| 41 #include "chrome/renderer/media/buffered_data_source.h" | 42 #include "chrome/renderer/media/buffered_data_source.h" |
| 42 #include "chrome/renderer/navigation_state.h" | 43 #include "chrome/renderer/navigation_state.h" |
| 43 #include "chrome/renderer/print_web_view_helper.h" | 44 #include "chrome/renderer/print_web_view_helper.h" |
| 44 #include "chrome/renderer/render_process.h" | 45 #include "chrome/renderer/render_process.h" |
| 45 #include "chrome/renderer/renderer_logging.h" | 46 #include "chrome/renderer/renderer_logging.h" |
| 46 #include "chrome/renderer/user_script_slave.h" | 47 #include "chrome/renderer/user_script_slave.h" |
| 47 #include "chrome/renderer/visitedlink_slave.h" | 48 #include "chrome/renderer/visitedlink_slave.h" |
| (...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 // TODO(rafaelw): This is kind of gross. We need a way to call through | 1413 // TODO(rafaelw): This is kind of gross. We need a way to call through |
| 1413 // the glue layer to retrieve the current v8::Context. | 1414 // the glue layer to retrieve the current v8::Context. |
| 1414 if (frame->GetURL().SchemeIs(chrome::kExtensionScheme)) | 1415 if (frame->GetURL().SchemeIs(chrome::kExtensionScheme)) |
| 1415 ExtensionProcessBindings::RegisterExtensionContext(frame); | 1416 ExtensionProcessBindings::RegisterExtensionContext(frame); |
| 1416 | 1417 |
| 1417 if (RenderThread::current()) // Will be NULL during unit tests. | 1418 if (RenderThread::current()) // Will be NULL during unit tests. |
| 1418 RenderThread::current()->user_script_slave()->InjectScripts( | 1419 RenderThread::current()->user_script_slave()->InjectScripts( |
| 1419 frame, UserScript::DOCUMENT_START); | 1420 frame, UserScript::DOCUMENT_START); |
| 1420 } | 1421 } |
| 1421 | 1422 |
| 1423 void RenderView::DidCreateScriptContext(WebFrame* webframe) { |
| 1424 EventBindings::HandleContextCreated(webframe); |
| 1425 } |
| 1426 |
| 1427 void RenderView::DidDestroyScriptContext(WebFrame* webframe) { |
| 1428 EventBindings::HandleContextDestroyed(webframe); |
| 1429 } |
| 1430 |
| 1422 WindowOpenDisposition RenderView::DispositionForNavigationAction( | 1431 WindowOpenDisposition RenderView::DispositionForNavigationAction( |
| 1423 WebView* webview, | 1432 WebView* webview, |
| 1424 WebFrame* frame, | 1433 WebFrame* frame, |
| 1425 const WebURLRequest& request, | 1434 const WebURLRequest& request, |
| 1426 WebNavigationType type, | 1435 WebNavigationType type, |
| 1427 WindowOpenDisposition disposition, | 1436 WindowOpenDisposition disposition, |
| 1428 bool is_redirect) { | 1437 bool is_redirect) { |
| 1429 // A content initiated navigation may have originated from a link-click, | 1438 // A content initiated navigation may have originated from a link-click, |
| 1430 // script, drag-n-drop operation, etc. | 1439 // script, drag-n-drop operation, etc. |
| 1431 bool is_content_initiated = | 1440 bool is_content_initiated = |
| (...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2866 scoped_ptr<PasswordForm> password_form( | 2875 scoped_ptr<PasswordForm> password_form( |
| 2867 PasswordFormDomManager::CreatePasswordForm(form)); | 2876 PasswordFormDomManager::CreatePasswordForm(form)); |
| 2868 if (password_form.get()) | 2877 if (password_form.get()) |
| 2869 password_forms.push_back(*password_form); | 2878 password_forms.push_back(*password_form); |
| 2870 } | 2879 } |
| 2871 } | 2880 } |
| 2872 | 2881 |
| 2873 if (!password_forms.empty()) | 2882 if (!password_forms.empty()) |
| 2874 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); | 2883 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); |
| 2875 } | 2884 } |
| OLD | NEW |