| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "blimp/engine/app/blimp_browser_main_parts.h" | 5 #include "blimp/engine/app/blimp_browser_main_parts.h" |
| 6 #include "blimp/engine/app/blimp_content_browser_client.h" | 6 #include "blimp/engine/app/blimp_content_browser_client.h" |
| 7 #include "blimp/engine/app/settings_manager.h" | 7 #include "blimp/engine/app/settings_manager.h" |
| 8 #include "blimp/engine/mojo/blob_channel_service.h" | 8 #include "blimp/engine/mojo/blob_channel_service.h" |
| 9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 10 #include "services/shell/public/cpp/interface_registry.h" | 10 #include "services/shell/public/cpp/interface_registry.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 prefs); | 36 prefs); |
| 37 } | 37 } |
| 38 | 38 |
| 39 BlimpBrowserContext* BlimpContentBrowserClient::GetBrowserContext() { | 39 BlimpBrowserContext* BlimpContentBrowserClient::GetBrowserContext() { |
| 40 return blimp_browser_main_parts_->GetBrowserContext(); | 40 return blimp_browser_main_parts_->GetBrowserContext(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void BlimpContentBrowserClient::ExposeInterfacesToRenderer( | 43 void BlimpContentBrowserClient::ExposeInterfacesToRenderer( |
| 44 shell::InterfaceRegistry* registry, | 44 shell::InterfaceRegistry* registry, |
| 45 content::RenderProcessHost* render_process_host) { | 45 content::RenderProcessHost* render_process_host) { |
| 46 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner = | 46 registry->AddInterface<mojom::BlobChannel>(base::Bind( |
| 47 content::BrowserThread::GetTaskRunnerForThread( | 47 &BlobChannelService::BindRequest, |
| 48 content::BrowserThread::UI); | 48 base::Unretained(blimp_browser_main_parts_->GetBlobChannelService()))); |
| 49 registry->AddInterface<mojom::BlobChannel>( | |
| 50 base::Bind(&BlobChannelService::Create, | |
| 51 blimp_browser_main_parts_->GetBlobChannelSender()), | |
| 52 ui_task_runner); | |
| 53 } | 49 } |
| 54 | 50 |
| 55 } // namespace engine | 51 } // namespace engine |
| 56 } // namespace blimp | 52 } // namespace blimp |
| OLD | NEW |