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

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

Issue 2191033002: Split ServiceRegistryAndroid into InterfaceRegistryAndroid and InterfaceProviderAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 <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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 #include "ui/accessibility/ax_tree_update.h" 87 #include "ui/accessibility/ax_tree_update.h"
88 #include "ui/gfx/geometry/quad_f.h" 88 #include "ui/gfx/geometry/quad_f.h"
89 #include "url/gurl.h" 89 #include "url/gurl.h"
90 90
91 // media::mojom::ServiceFactory is generated in GN builds only. 91 // media::mojom::ServiceFactory is generated in GN builds only.
92 #if defined(MOJO_SHELL_CLIENT) 92 #if defined(MOJO_SHELL_CLIENT)
93 #include "media/mojo/interfaces/service_factory.mojom.h" 93 #include "media/mojo/interfaces/service_factory.mojom.h"
94 #endif 94 #endif
95 95
96 #if defined(OS_ANDROID) 96 #if defined(OS_ANDROID)
97 #include "content/browser/mojo/service_registrar_android.h" 97 #include "content/browser/mojo/interface_registrar_android.h"
98 #if defined(ENABLE_MOJO_CDM) 98 #if defined(ENABLE_MOJO_CDM)
99 #include "content/browser/media/android/provision_fetcher_impl.h" 99 #include "content/browser/media/android/provision_fetcher_impl.h"
100 #endif 100 #endif
101 #endif 101 #endif
102 102
103 #if defined(OS_MACOSX) 103 #if defined(OS_MACOSX)
104 #include "content/browser/frame_host/popup_menu_helper_mac.h" 104 #include "content/browser/frame_host/popup_menu_helper_mac.h"
105 #endif 105 #endif
106 106
107 #if defined(ENABLE_WEBVR) 107 #if defined(ENABLE_WEBVR)
(...skipping 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after
2472 2472
2473 2473
2474 shell::mojom::InterfaceProviderPtr remote_interfaces; 2474 shell::mojom::InterfaceProviderPtr remote_interfaces;
2475 shell::mojom::InterfaceProviderRequest remote_interfaces_request = 2475 shell::mojom::InterfaceProviderRequest remote_interfaces_request =
2476 GetProxy(&remote_interfaces); 2476 GetProxy(&remote_interfaces);
2477 remote_interfaces_.reset(new shell::InterfaceProvider); 2477 remote_interfaces_.reset(new shell::InterfaceProvider);
2478 remote_interfaces_->Bind(std::move(remote_interfaces)); 2478 remote_interfaces_->Bind(std::move(remote_interfaces));
2479 frame_->GetInterfaceProvider(std::move(remote_interfaces_request)); 2479 frame_->GetInterfaceProvider(std::move(remote_interfaces_request));
2480 2480
2481 #if defined(OS_ANDROID) 2481 #if defined(OS_ANDROID)
2482 service_registry_android_ = 2482 interface_registry_android_ =
2483 ServiceRegistryAndroid::Create(interface_registry_.get(), 2483 InterfaceRegistryAndroid::Create(interface_registry_.get());
2484 remote_interfaces_.get()); 2484 InterfaceRegistrarAndroid::ExposeInterfacesToFrame(
2485 ServiceRegistrarAndroid::RegisterFrameHostServices( 2485 interface_registry_android_.get());
2486 service_registry_android_.get());
2487 #endif 2486 #endif
2488 } 2487 }
2489 2488
2490 void RenderFrameHostImpl::InvalidateMojoConnection() { 2489 void RenderFrameHostImpl::InvalidateMojoConnection() {
2491 #if defined(OS_ANDROID) 2490 #if defined(OS_ANDROID)
2492 // The Android-specific service registry has a reference to 2491 // The Android-specific interface registry has a reference to
2493 // |service_registry_| and thus must be torn down first. 2492 // |interface_registry_| and thus must be torn down first.
2494 service_registry_android_.reset(); 2493 interface_registry_android_.reset();
2495 #endif 2494 #endif
2496 2495
2497 interface_registry_.reset(); 2496 interface_registry_.reset();
2498 frame_.reset(); 2497 frame_.reset();
2499 frame_host_binding_.Close(); 2498 frame_host_binding_.Close();
2500 2499
2501 // Disconnect with ImageDownloader Mojo service in RenderFrame. 2500 // Disconnect with ImageDownloader Mojo service in RenderFrame.
2502 mojo_image_downloader_.reset(); 2501 mojo_image_downloader_.reset();
2503 } 2502 }
2504 2503
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
3029 // handler after it's destroyed so it can't run after the RFHI is destroyed. 3028 // handler after it's destroyed so it can't run after the RFHI is destroyed.
3030 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3029 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3031 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3030 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3032 } 3031 }
3033 3032
3034 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3033 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3035 web_bluetooth_service_.reset(); 3034 web_bluetooth_service_.reset();
3036 } 3035 }
3037 3036
3038 } // namespace content 3037 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/mojo/interface_registrar_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698