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

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

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Add metrics and support for non-ASCII text messages to Java endpoints Created 3 years, 11 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/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 "services/shape_detection/public/interfaces/facedetection_provider.mojo m.h" 109 #include "services/shape_detection/public/interfaces/facedetection_provider.mojo m.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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 // The channel may not be initialized in some tests environments. In this 601 // The channel may not be initialized in some tests environments. In this
603 // case we set up a dummy interface provider. 602 // case we set up a dummy interface provider.
604 mojo::GetIsolatedProxy(&remote_interfaces); 603 mojo::GetIsolatedProxy(&remote_interfaces);
605 } 604 }
606 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl( 605 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl(
607 std::move(remote_interfaces))); 606 std::move(remote_interfaces)));
608 } 607 }
609 return remote_associated_interfaces_.get(); 608 return remote_associated_interfaces_.get();
610 } 609 }
611 610
612 #if defined(OS_ANDROID)
613 scoped_refptr<AppWebMessagePortMessageFilter>
614 RenderFrameHostImpl::GetAppWebMessagePortMessageFilter(int routing_id) {
615 if (!app_web_message_port_message_filter_) {
616 app_web_message_port_message_filter_ =
617 new AppWebMessagePortMessageFilter(routing_id);
618 GetProcess()->AddFilter(app_web_message_port_message_filter_.get());
619 }
620 return app_web_message_port_message_filter_;
621 }
622 #endif
623
624 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() { 611 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() {
625 // Works around the crashes seen in https://crbug.com/501863, where the 612 // Works around the crashes seen in https://crbug.com/501863, where the
626 // active WebContents from a browser iterator may contain a render frame 613 // active WebContents from a browser iterator may contain a render frame
627 // detached from the frame tree. This tries to find a RenderWidgetHost 614 // detached from the frame tree. This tries to find a RenderWidgetHost
628 // attached to an ancestor frame, and defaults to visibility hidden if 615 // attached to an ancestor frame, and defaults to visibility hidden if
629 // it fails. 616 // it fails.
630 // TODO(yfriedman, peter): Ideally this would never be called on an 617 // TODO(yfriedman, peter): Ideally this would never be called on an
631 // unattached frame and we could omit this check. See 618 // unattached frame and we could omit this check. See
632 // https://crbug.com/615867. 619 // https://crbug.com/615867.
633 RenderFrameHostImpl* frame = this; 620 RenderFrameHostImpl* frame = this;
(...skipping 2761 matching lines...) Expand 10 before | Expand all | Expand 10 after
3395 // There is no pending NavigationEntry in these cases, so pass 0 as the 3382 // There is no pending NavigationEntry in these cases, so pass 0 as the
3396 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3383 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3397 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3384 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3398 return NavigationHandleImpl::Create( 3385 return NavigationHandleImpl::Create(
3399 params.url, frame_tree_node_, is_renderer_initiated, 3386 params.url, frame_tree_node_, is_renderer_initiated,
3400 params.was_within_same_page, base::TimeTicks::Now(), 3387 params.was_within_same_page, base::TimeTicks::Now(),
3401 entry_id_for_data_nav, false); // started_from_context_menu 3388 entry_id_for_data_nav, false); // started_from_context_menu
3402 } 3389 }
3403 3390
3404 } // namespace content 3391 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698