Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Add missing ScopedAsyncTaskScheduler instance for the new unit tests; required by a recent change t… Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 2864 matching lines...) Expand 10 before | Expand all | Expand 10 after
3506 // There is no pending NavigationEntry in these cases, so pass 0 as the 3493 // There is no pending NavigationEntry in these cases, so pass 0 as the
3507 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3494 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3508 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3495 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3509 return NavigationHandleImpl::Create( 3496 return NavigationHandleImpl::Create(
3510 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, 3497 params.url, params.redirects, frame_tree_node_, is_renderer_initiated,
3511 params.was_within_same_page, base::TimeTicks::Now(), 3498 params.was_within_same_page, base::TimeTicks::Now(),
3512 entry_id_for_data_nav, false); // started_from_context_menu 3499 entry_id_for_data_nav, false); // started_from_context_menu
3513 } 3500 }
3514 3501
3515 } // namespace content 3502 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/frame_host/render_frame_proxy_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698