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

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

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Rebase 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" 105 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
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 "ui/accessibility/ax_tree.h" 109 #include "ui/accessibility/ax_tree.h"
110 #include "ui/accessibility/ax_tree_update.h" 110 #include "ui/accessibility/ax_tree_update.h"
111 #include "ui/gfx/geometry/quad_f.h" 111 #include "ui/gfx/geometry/quad_f.h"
112 #include "url/gurl.h" 112 #include "url/gurl.h"
113 113
114 #if defined(OS_ANDROID) 114 #if defined(OS_ANDROID)
115 #include "content/browser/android/app_web_message_port_message_filter.h"
116 #include "content/public/browser/android/java_interfaces.h" 115 #include "content/public/browser/android/java_interfaces.h"
117 #include "content/browser/media/android/media_player_renderer.h" 116 #include "content/browser/media/android/media_player_renderer.h"
118 #include "media/base/audio_renderer_sink.h" 117 #include "media/base/audio_renderer_sink.h"
119 #include "media/base/video_renderer_sink.h" 118 #include "media/base/video_renderer_sink.h"
120 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck 119 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck
121 #endif 120 #endif
122 121
123 #if defined(OS_MACOSX) 122 #if defined(OS_MACOSX)
124 #include "content/browser/frame_host/popup_menu_helper_mac.h" 123 #include "content/browser/frame_host/popup_menu_helper_mac.h"
125 #endif 124 #endif
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 // The channel may not be initialized in some tests environments. In this 600 // The channel may not be initialized in some tests environments. In this
602 // case we set up a dummy interface provider. 601 // case we set up a dummy interface provider.
603 mojo::GetIsolatedProxy(&remote_interfaces); 602 mojo::GetIsolatedProxy(&remote_interfaces);
604 } 603 }
605 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl( 604 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl(
606 std::move(remote_interfaces))); 605 std::move(remote_interfaces)));
607 } 606 }
608 return remote_associated_interfaces_.get(); 607 return remote_associated_interfaces_.get();
609 } 608 }
610 609
611 #if defined(OS_ANDROID)
612 scoped_refptr<AppWebMessagePortMessageFilter>
613 RenderFrameHostImpl::GetAppWebMessagePortMessageFilter(int routing_id) {
614 if (!app_web_message_port_message_filter_) {
615 app_web_message_port_message_filter_ =
616 new AppWebMessagePortMessageFilter(routing_id);
617 GetProcess()->AddFilter(app_web_message_port_message_filter_.get());
618 }
619 return app_web_message_port_message_filter_;
620 }
621 #endif
622
623 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() { 610 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() {
624 // Works around the crashes seen in https://crbug.com/501863, where the 611 // Works around the crashes seen in https://crbug.com/501863, where the
625 // active WebContents from a browser iterator may contain a render frame 612 // active WebContents from a browser iterator may contain a render frame
626 // detached from the frame tree. This tries to find a RenderWidgetHost 613 // detached from the frame tree. This tries to find a RenderWidgetHost
627 // attached to an ancestor frame, and defaults to visibility hidden if 614 // attached to an ancestor frame, and defaults to visibility hidden if
628 // it fails. 615 // it fails.
629 // TODO(yfriedman, peter): Ideally this would never be called on an 616 // TODO(yfriedman, peter): Ideally this would never be called on an
630 // unattached frame and we could omit this check. See 617 // unattached frame and we could omit this check. See
631 // https://crbug.com/615867. 618 // https://crbug.com/615867.
632 RenderFrameHostImpl* frame = this; 619 RenderFrameHostImpl* frame = this;
(...skipping 2773 matching lines...) Expand 10 before | Expand all | Expand 10 after
3406 // There is no pending NavigationEntry in these cases, so pass 0 as the 3393 // There is no pending NavigationEntry in these cases, so pass 0 as the
3407 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3394 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3408 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3395 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3409 return NavigationHandleImpl::Create( 3396 return NavigationHandleImpl::Create(
3410 params.url, frame_tree_node_, is_renderer_initiated, 3397 params.url, frame_tree_node_, is_renderer_initiated,
3411 params.was_within_same_page, base::TimeTicks::Now(), 3398 params.was_within_same_page, base::TimeTicks::Now(),
3412 entry_id_for_data_nav, false); // started_from_context_menu 3399 entry_id_for_data_nav, false); // started_from_context_menu
3413 } 3400 }
3414 3401
3415 } // namespace content 3402 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698