| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 #include "mojo/public/cpp/bindings/strong_binding.h" | 106 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 107 #include "services/service_manager/public/cpp/connector.h" | 107 #include "services/service_manager/public/cpp/connector.h" |
| 108 #include "services/service_manager/public/cpp/interface_provider.h" | 108 #include "services/service_manager/public/cpp/interface_provider.h" |
| 109 #include "third_party/WebKit/public/platform/modules/shapedetection/facedetectio
n_provider.mojom.h" | 109 #include "third_party/WebKit/public/platform/modules/shapedetection/facedetectio
n_provider.mojom.h" |
| 110 #include "ui/accessibility/ax_tree.h" | 110 #include "ui/accessibility/ax_tree.h" |
| 111 #include "ui/accessibility/ax_tree_update.h" | 111 #include "ui/accessibility/ax_tree_update.h" |
| 112 #include "ui/gfx/geometry/quad_f.h" | 112 #include "ui/gfx/geometry/quad_f.h" |
| 113 #include "url/gurl.h" | 113 #include "url/gurl.h" |
| 114 | 114 |
| 115 #if defined(OS_ANDROID) | 115 #if defined(OS_ANDROID) |
| 116 #include "content/browser/android/app_web_message_port_message_filter.h" | |
| 117 #include "content/public/browser/android/java_interfaces.h" | 116 #include "content/public/browser/android/java_interfaces.h" |
| 118 #include "content/browser/media/android/media_player_renderer.h" | 117 #include "content/browser/media/android/media_player_renderer.h" |
| 119 #include "media/base/audio_renderer_sink.h" | 118 #include "media/base/audio_renderer_sink.h" |
| 120 #include "media/base/video_renderer_sink.h" | 119 #include "media/base/video_renderer_sink.h" |
| 121 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck | 120 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck |
| 122 #endif | 121 #endif |
| 123 | 122 |
| 124 #if defined(OS_MACOSX) | 123 #if defined(OS_MACOSX) |
| 125 #include "content/browser/frame_host/popup_menu_helper_mac.h" | 124 #include "content/browser/frame_host/popup_menu_helper_mac.h" |
| 126 #endif | 125 #endif |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 // The channel may not be initialized in some tests environments. In this | 598 // The channel may not be initialized in some tests environments. In this |
| 600 // case we set up a dummy interface provider. | 599 // case we set up a dummy interface provider. |
| 601 mojo::GetDummyProxyForTesting(&remote_interfaces); | 600 mojo::GetDummyProxyForTesting(&remote_interfaces); |
| 602 } | 601 } |
| 603 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl( | 602 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl( |
| 604 std::move(remote_interfaces))); | 603 std::move(remote_interfaces))); |
| 605 } | 604 } |
| 606 return remote_associated_interfaces_.get(); | 605 return remote_associated_interfaces_.get(); |
| 607 } | 606 } |
| 608 | 607 |
| 609 #if defined(OS_ANDROID) | |
| 610 scoped_refptr<AppWebMessagePortMessageFilter> | |
| 611 RenderFrameHostImpl::GetAppWebMessagePortMessageFilter(int routing_id) { | |
| 612 if (!app_web_message_port_message_filter_) { | |
| 613 app_web_message_port_message_filter_ = | |
| 614 new AppWebMessagePortMessageFilter(routing_id); | |
| 615 GetProcess()->AddFilter(app_web_message_port_message_filter_.get()); | |
| 616 } | |
| 617 return app_web_message_port_message_filter_; | |
| 618 } | |
| 619 #endif | |
| 620 | |
| 621 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() { | 608 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() { |
| 622 // Works around the crashes seen in https://crbug.com/501863, where the | 609 // Works around the crashes seen in https://crbug.com/501863, where the |
| 623 // active WebContents from a browser iterator may contain a render frame | 610 // active WebContents from a browser iterator may contain a render frame |
| 624 // detached from the frame tree. This tries to find a RenderWidgetHost | 611 // detached from the frame tree. This tries to find a RenderWidgetHost |
| 625 // attached to an ancestor frame, and defaults to visibility hidden if | 612 // attached to an ancestor frame, and defaults to visibility hidden if |
| 626 // it fails. | 613 // it fails. |
| 627 // TODO(yfriedman, peter): Ideally this would never be called on an | 614 // TODO(yfriedman, peter): Ideally this would never be called on an |
| 628 // unattached frame and we could omit this check. See | 615 // unattached frame and we could omit this check. See |
| 629 // https://crbug.com/615867. | 616 // https://crbug.com/615867. |
| 630 RenderFrameHostImpl* frame = this; | 617 RenderFrameHostImpl* frame = this; |
| (...skipping 2753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3384 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3371 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3385 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3372 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3386 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3373 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3387 return NavigationHandleImpl::Create( | 3374 return NavigationHandleImpl::Create( |
| 3388 params.url, frame_tree_node_, is_renderer_initiated, | 3375 params.url, frame_tree_node_, is_renderer_initiated, |
| 3389 params.was_within_same_page, base::TimeTicks::Now(), | 3376 params.was_within_same_page, base::TimeTicks::Now(), |
| 3390 entry_id_for_data_nav, false); // started_from_context_menu | 3377 entry_id_for_data_nav, false); // started_from_context_menu |
| 3391 } | 3378 } |
| 3392 | 3379 |
| 3393 } // namespace content | 3380 } // namespace content |
| OLD | NEW |