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

Side by Side Diff: components/arc/arc_bridge_service.cc

Issue 2078263002: Example Bluetooth ARC++ test changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arc_tests
Patch Set: Created 4 years, 6 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
« no previous file with comments | « components/arc/arc_bridge_service.h ('k') | components/arc/bluetooth/arc_bluetooth_bridge.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 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 "components/arc/arc_bridge_service.h" 5 #include "components/arc/arc_bridge_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 observer->OnVideoInstanceReady(); 94 observer->OnVideoInstanceReady();
95 if (window_manager_instance()) 95 if (window_manager_instance())
96 observer->OnWindowManagerInstanceReady(); 96 observer->OnWindowManagerInstanceReady();
97 } 97 }
98 98
99 void ArcBridgeService::RemoveObserver(Observer* observer) { 99 void ArcBridgeService::RemoveObserver(Observer* observer) {
100 DCHECK(CalledOnValidThread()); 100 DCHECK(CalledOnValidThread());
101 observer_list_.RemoveObserver(observer); 101 observer_list_.RemoveObserver(observer);
102 } 102 }
103 103
104 mojom::BluetoothInstance* ArcBridgeService::bluetooth_instance() {
105 return bluetooth_ptr_.get();
106 }
107
108 int32_t ArcBridgeService::bluetooth_version() const {
109 return bluetooth_ptr_.version();
110 }
111
104 void ArcBridgeService::OnAppInstanceReady(mojom::AppInstancePtr app_ptr) { 112 void ArcBridgeService::OnAppInstanceReady(mojom::AppInstancePtr app_ptr) {
105 DCHECK(CalledOnValidThread()); 113 DCHECK(CalledOnValidThread());
106 temporary_app_ptr_ = std::move(app_ptr); 114 temporary_app_ptr_ = std::move(app_ptr);
107 temporary_app_ptr_.QueryVersion(base::Bind( 115 temporary_app_ptr_.QueryVersion(base::Bind(
108 &ArcBridgeService::OnAppVersionReady, weak_factory_.GetWeakPtr())); 116 &ArcBridgeService::OnAppVersionReady, weak_factory_.GetWeakPtr()));
109 } 117 }
110 118
111 void ArcBridgeService::OnAppVersionReady(int32_t version) { 119 void ArcBridgeService::OnAppVersionReady(int32_t version) {
112 DCHECK(CalledOnValidThread()); 120 DCHECK(CalledOnValidThread());
113 app_ptr_ = std::move(temporary_app_ptr_); 121 app_ptr_ = std::move(temporary_app_ptr_);
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 CloseObbMounterChannel(); 633 CloseObbMounterChannel();
626 ClosePolicyChannel(); 634 ClosePolicyChannel();
627 ClosePowerChannel(); 635 ClosePowerChannel();
628 CloseProcessChannel(); 636 CloseProcessChannel();
629 CloseStorageManagerChannel(); 637 CloseStorageManagerChannel();
630 CloseVideoChannel(); 638 CloseVideoChannel();
631 CloseWindowManagerChannel(); 639 CloseWindowManagerChannel();
632 } 640 }
633 641
634 } // namespace arc 642 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/arc_bridge_service.h ('k') | components/arc/bluetooth/arc_bluetooth_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698