| 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/associated_interface_ptr.h" | 106 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" |
| 107 #include "mojo/public/cpp/bindings/strong_binding.h" | 107 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 108 #include "services/service_manager/public/cpp/connector.h" | 108 #include "services/service_manager/public/cpp/connector.h" |
| 109 #include "services/service_manager/public/cpp/interface_provider.h" | 109 #include "services/service_manager/public/cpp/interface_provider.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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 // The channel may not be initialized in some tests environments. In this | 609 // The channel may not be initialized in some tests environments. In this |
| 611 // case we set up a dummy interface provider. | 610 // case we set up a dummy interface provider. |
| 612 mojo::GetIsolatedProxy(&remote_interfaces); | 611 mojo::GetIsolatedProxy(&remote_interfaces); |
| 613 } | 612 } |
| 614 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl( | 613 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl( |
| 615 std::move(remote_interfaces))); | 614 std::move(remote_interfaces))); |
| 616 } | 615 } |
| 617 return remote_associated_interfaces_.get(); | 616 return remote_associated_interfaces_.get(); |
| 618 } | 617 } |
| 619 | 618 |
| 620 #if defined(OS_ANDROID) | |
| 621 scoped_refptr<AppWebMessagePortMessageFilter> | |
| 622 RenderFrameHostImpl::GetAppWebMessagePortMessageFilter(int routing_id) { | |
| 623 if (!app_web_message_port_message_filter_) { | |
| 624 app_web_message_port_message_filter_ = | |
| 625 new AppWebMessagePortMessageFilter(routing_id); | |
| 626 GetProcess()->AddFilter(app_web_message_port_message_filter_.get()); | |
| 627 } | |
| 628 return app_web_message_port_message_filter_; | |
| 629 } | |
| 630 #endif | |
| 631 | |
| 632 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() { | 619 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() { |
| 633 // Works around the crashes seen in https://crbug.com/501863, where the | 620 // Works around the crashes seen in https://crbug.com/501863, where the |
| 634 // active WebContents from a browser iterator may contain a render frame | 621 // active WebContents from a browser iterator may contain a render frame |
| 635 // detached from the frame tree. This tries to find a RenderWidgetHost | 622 // detached from the frame tree. This tries to find a RenderWidgetHost |
| 636 // attached to an ancestor frame, and defaults to visibility hidden if | 623 // attached to an ancestor frame, and defaults to visibility hidden if |
| 637 // it fails. | 624 // it fails. |
| 638 // TODO(yfriedman, peter): Ideally this would never be called on an | 625 // TODO(yfriedman, peter): Ideally this would never be called on an |
| 639 // unattached frame and we could omit this check. See | 626 // unattached frame and we could omit this check. See |
| 640 // https://crbug.com/615867. | 627 // https://crbug.com/615867. |
| 641 RenderFrameHostImpl* frame = this; | 628 RenderFrameHostImpl* frame = this; |
| (...skipping 2813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3455 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3442 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3456 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3443 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3457 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3444 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3458 return NavigationHandleImpl::Create( | 3445 return NavigationHandleImpl::Create( |
| 3459 params.url, frame_tree_node_, is_renderer_initiated, | 3446 params.url, frame_tree_node_, is_renderer_initiated, |
| 3460 params.was_within_same_page, base::TimeTicks::Now(), | 3447 params.was_within_same_page, base::TimeTicks::Now(), |
| 3461 entry_id_for_data_nav, false); // started_from_context_menu | 3448 entry_id_for_data_nav, false); // started_from_context_menu |
| 3462 } | 3449 } |
| 3463 | 3450 |
| 3464 } // namespace content | 3451 } // namespace content |
| OLD | NEW |