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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 #include "media/mojo/interfaces/service_factory.mojom.h" | 94 #include "media/mojo/interfaces/service_factory.mojom.h" |
95 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" | 95 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" |
96 #include "services/shell/public/cpp/connector.h" | 96 #include "services/shell/public/cpp/connector.h" |
97 #include "services/shell/public/cpp/interface_provider.h" | 97 #include "services/shell/public/cpp/interface_provider.h" |
98 #include "ui/accessibility/ax_tree.h" | 98 #include "ui/accessibility/ax_tree.h" |
99 #include "ui/accessibility/ax_tree_update.h" | 99 #include "ui/accessibility/ax_tree_update.h" |
100 #include "ui/gfx/geometry/quad_f.h" | 100 #include "ui/gfx/geometry/quad_f.h" |
101 #include "url/gurl.h" | 101 #include "url/gurl.h" |
102 | 102 |
103 #if defined(OS_ANDROID) | 103 #if defined(OS_ANDROID) |
| 104 #include "content/browser/android/app_web_message_port_message_filter.h" |
104 #include "content/public/browser/android/java_interfaces.h" | 105 #include "content/public/browser/android/java_interfaces.h" |
105 #if defined(ENABLE_MOJO_CDM) | 106 #if defined(ENABLE_MOJO_CDM) |
106 #include "content/browser/media/android/provision_fetcher_impl.h" | 107 #include "content/browser/media/android/provision_fetcher_impl.h" |
107 #endif | 108 #endif |
108 #endif | 109 #endif |
109 | 110 |
110 #if defined(OS_MACOSX) | 111 #if defined(OS_MACOSX) |
111 #include "content/browser/frame_host/popup_menu_helper_mac.h" | 112 #include "content/browser/frame_host/popup_menu_helper_mac.h" |
112 #endif | 113 #endif |
113 | 114 |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 // The channel may not be initialized in some tests environments. In this | 522 // The channel may not be initialized in some tests environments. In this |
522 // case we set up a dummy interface provider. | 523 // case we set up a dummy interface provider. |
523 mojo::GetDummyProxyForTesting(&remote_interfaces); | 524 mojo::GetDummyProxyForTesting(&remote_interfaces); |
524 } | 525 } |
525 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl( | 526 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl( |
526 std::move(remote_interfaces))); | 527 std::move(remote_interfaces))); |
527 } | 528 } |
528 return remote_associated_interfaces_.get(); | 529 return remote_associated_interfaces_.get(); |
529 } | 530 } |
530 | 531 |
| 532 #if defined(OS_ANDROID) |
| 533 scoped_refptr<AppWebMessagePortMessageFilter> |
| 534 RenderFrameHostImpl::GetAppWebMessagePortMessageFilter(int routing_id) { |
| 535 if (!app_web_message_port_message_filter_) { |
| 536 app_web_message_port_message_filter_ = |
| 537 new AppWebMessagePortMessageFilter(routing_id); |
| 538 GetProcess()->AddFilter(app_web_message_port_message_filter_.get()); |
| 539 } |
| 540 return app_web_message_port_message_filter_; |
| 541 } |
| 542 #endif |
| 543 |
531 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() { | 544 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() { |
532 // Works around the crashes seen in https://crbug.com/501863, where the | 545 // Works around the crashes seen in https://crbug.com/501863, where the |
533 // active WebContents from a browser iterator may contain a render frame | 546 // active WebContents from a browser iterator may contain a render frame |
534 // detached from the frame tree. This tries to find a RenderWidgetHost | 547 // detached from the frame tree. This tries to find a RenderWidgetHost |
535 // attached to an ancestor frame, and defaults to visibility hidden if | 548 // attached to an ancestor frame, and defaults to visibility hidden if |
536 // it fails. | 549 // it fails. |
537 // TODO(yfriedman, peter): Ideally this would never be called on an | 550 // TODO(yfriedman, peter): Ideally this would never be called on an |
538 // unattached frame and we could omit this check. See | 551 // unattached frame and we could omit this check. See |
539 // https://crbug.com/615867. | 552 // https://crbug.com/615867. |
540 RenderFrameHostImpl* frame = this; | 553 RenderFrameHostImpl* frame = this; |
(...skipping 2569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3110 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3123 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
3111 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3124 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
3112 return web_bluetooth_service_.get(); | 3125 return web_bluetooth_service_.get(); |
3113 } | 3126 } |
3114 | 3127 |
3115 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3128 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
3116 web_bluetooth_service_.reset(); | 3129 web_bluetooth_service_.reset(); |
3117 } | 3130 } |
3118 | 3131 |
3119 } // namespace content | 3132 } // namespace content |
OLD | NEW |