| 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 30 matching lines...) Expand all Loading... |
| 41 #include "content/common/request_extra_data.h" | 41 #include "content/common/request_extra_data.h" |
| 42 #include "content/common/socket_stream_handle_data.h" | 42 #include "content/common/socket_stream_handle_data.h" |
| 43 #include "content/common/view_messages.h" | 43 #include "content/common/view_messages.h" |
| 44 #include "content/common/webmessageportchannel_impl.h" | 44 #include "content/common/webmessageportchannel_impl.h" |
| 45 #include "content/public/common/bindings_policy.h" | 45 #include "content/public/common/bindings_policy.h" |
| 46 #include "content/public/common/content_client.h" | 46 #include "content/public/common/content_client.h" |
| 47 #include "content/public/common/content_constants.h" | 47 #include "content/public/common/content_constants.h" |
| 48 #include "content/public/common/content_switches.h" | 48 #include "content/public/common/content_switches.h" |
| 49 #include "content/public/common/context_menu_params.h" | 49 #include "content/public/common/context_menu_params.h" |
| 50 #include "content/public/common/file_chooser_params.h" | 50 #include "content/public/common/file_chooser_params.h" |
| 51 #include "content/public/common/savable_url_schemes.h" |
| 51 #include "content/public/common/selected_file_info.h" | 52 #include "content/public/common/selected_file_info.h" |
| 52 #include "content/public/common/url_constants.h" | 53 #include "content/public/common/url_constants.h" |
| 53 #include "content/public/renderer/content_renderer_client.h" | 54 #include "content/public/renderer/content_renderer_client.h" |
| 54 #include "content/public/renderer/document_state.h" | 55 #include "content/public/renderer/document_state.h" |
| 55 #include "content/public/renderer/navigation_state.h" | 56 #include "content/public/renderer/navigation_state.h" |
| 56 #include "content/public/renderer/render_view_observer.h" | 57 #include "content/public/renderer/render_view_observer.h" |
| 57 #include "content/public/renderer/render_view_visitor.h" | 58 #include "content/public/renderer/render_view_visitor.h" |
| 58 #include "content/renderer/device_orientation_dispatcher.h" | 59 #include "content/renderer/device_orientation_dispatcher.h" |
| 59 #include "content/renderer/devtools_agent.h" | 60 #include "content/renderer/devtools_agent.h" |
| 60 #include "content/renderer/dom_automation_controller.h" | 61 #include "content/renderer/dom_automation_controller.h" |
| (...skipping 4509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4570 webkit_glue::SavableResourcesResult result(&resources_list, | 4571 webkit_glue::SavableResourcesResult result(&resources_list, |
| 4571 &referrer_urls_list, | 4572 &referrer_urls_list, |
| 4572 &referrer_policies_list, | 4573 &referrer_policies_list, |
| 4573 &frames_list); | 4574 &frames_list); |
| 4574 | 4575 |
| 4575 // webkit/ doesn't know about content::Referrer. | 4576 // webkit/ doesn't know about content::Referrer. |
| 4576 if (!webkit_glue::GetAllSavableResourceLinksForCurrentPage( | 4577 if (!webkit_glue::GetAllSavableResourceLinksForCurrentPage( |
| 4577 webview(), | 4578 webview(), |
| 4578 page_url, | 4579 page_url, |
| 4579 &result, | 4580 &result, |
| 4580 content::GetSavableSchemes())) { | 4581 const_cast<const char**>(content::GetSavableSchemes()))) { |
| 4581 // If something is wrong when collecting all savable resource links, | 4582 // If something is wrong when collecting all savable resource links, |
| 4582 // send empty list to embedder(browser) to tell it failed. | 4583 // send empty list to embedder(browser) to tell it failed. |
| 4583 referrer_urls_list.clear(); | 4584 referrer_urls_list.clear(); |
| 4584 referrer_policies_list.clear(); | 4585 referrer_policies_list.clear(); |
| 4585 resources_list.clear(); | 4586 resources_list.clear(); |
| 4586 frames_list.clear(); | 4587 frames_list.clear(); |
| 4587 } | 4588 } |
| 4588 | 4589 |
| 4589 std::vector<content::Referrer> referrers_list; | 4590 std::vector<content::Referrer> referrers_list; |
| 4590 CHECK_EQ(referrer_urls_list.size(), referrer_policies_list.size()); | 4591 CHECK_EQ(referrer_urls_list.size(), referrer_policies_list.size()); |
| (...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5435 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5436 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5436 return !!RenderThreadImpl::current()->compositor_thread(); | 5437 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5437 } | 5438 } |
| 5438 | 5439 |
| 5439 void RenderViewImpl::OnJavaBridgeInit() { | 5440 void RenderViewImpl::OnJavaBridgeInit() { |
| 5440 DCHECK(!java_bridge_dispatcher_); | 5441 DCHECK(!java_bridge_dispatcher_); |
| 5441 #if defined(ENABLE_JAVA_BRIDGE) | 5442 #if defined(ENABLE_JAVA_BRIDGE) |
| 5442 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5443 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5443 #endif | 5444 #endif |
| 5444 } | 5445 } |
| OLD | NEW |