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

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

Issue 1607603005: Revert of Host-side implementation of ARC Intent handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « components/arc/arc_service_manager.h ('k') | components/arc/common/arc_bridge.mojom » ('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_service_manager.h" 5 #include "components/arc/arc_service_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/sequenced_task_runner.h" 9 #include "base/sequenced_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
11 #include "components/arc/arc_bridge_bootstrap.h" 11 #include "components/arc/arc_bridge_bootstrap.h"
12 #include "components/arc/arc_bridge_service_impl.h" 12 #include "components/arc/arc_bridge_service_impl.h"
13 #include "components/arc/auth/arc_auth_service.h" 13 #include "components/arc/auth/arc_auth_service.h"
14 #include "components/arc/clipboard/arc_clipboard_bridge.h" 14 #include "components/arc/clipboard/arc_clipboard_bridge.h"
15 #include "components/arc/ime/arc_ime_bridge.h" 15 #include "components/arc/ime/arc_ime_bridge.h"
16 #include "components/arc/input/arc_input_bridge.h" 16 #include "components/arc/input/arc_input_bridge.h"
17 #include "components/arc/intent_helper/arc_intent_helper_bridge.h"
18 #include "components/arc/power/arc_power_bridge.h" 17 #include "components/arc/power/arc_power_bridge.h"
19 #include "components/arc/settings/arc_settings_bridge.h" 18 #include "components/arc/settings/arc_settings_bridge.h"
20 #include "components/arc/video/arc_video_bridge.h" 19 #include "components/arc/video/arc_video_bridge.h"
21 #include "ui/arc/notification/arc_notification_manager.h" 20 #include "ui/arc/notification/arc_notification_manager.h"
22 21
23 namespace arc { 22 namespace arc {
24 23
25 namespace { 24 namespace {
26 25
27 // Weak pointer. This class is owned by ChromeBrowserMainPartsChromeos. 26 // Weak pointer. This class is owned by ChromeBrowserMainPartsChromeos.
28 ArcServiceManager* g_arc_service_manager = nullptr; 27 ArcServiceManager* g_arc_service_manager = nullptr;
29 28
30 } // namespace 29 } // namespace
31 30
32 ArcServiceManager::ArcServiceManager( 31 ArcServiceManager::ArcServiceManager(
33 scoped_ptr<ArcAuthService> auth_service, 32 scoped_ptr<ArcAuthService> auth_service,
34 scoped_ptr<ArcIntentHelperBridge> intent_helper_bridge,
35 scoped_ptr<ArcSettingsBridge> settings_bridge, 33 scoped_ptr<ArcSettingsBridge> settings_bridge,
36 scoped_ptr<ArcVideoBridge> video_bridge) 34 scoped_ptr<ArcVideoBridge> video_bridge)
37 : arc_bridge_service_( 35 : arc_bridge_service_(
38 new ArcBridgeServiceImpl(ArcBridgeBootstrap::Create())), 36 new ArcBridgeServiceImpl(ArcBridgeBootstrap::Create())),
39 arc_auth_service_(std::move(auth_service)), 37 arc_auth_service_(std::move(auth_service)),
40 arc_clipboard_bridge_(new ArcClipboardBridge(arc_bridge_service_.get())), 38 arc_clipboard_bridge_(new ArcClipboardBridge(arc_bridge_service_.get())),
41 arc_ime_bridge_(new ArcImeBridge(arc_bridge_service_.get())), 39 arc_ime_bridge_(new ArcImeBridge(arc_bridge_service_.get())),
42 arc_input_bridge_(ArcInputBridge::Create(arc_bridge_service_.get())), 40 arc_input_bridge_(ArcInputBridge::Create(arc_bridge_service_.get())),
43 arc_intent_helper_bridge_(std::move(intent_helper_bridge)),
44 arc_settings_bridge_(std::move(settings_bridge)), 41 arc_settings_bridge_(std::move(settings_bridge)),
45 arc_power_bridge_(new ArcPowerBridge(arc_bridge_service_.get())), 42 arc_power_bridge_(new ArcPowerBridge(arc_bridge_service_.get())),
46 arc_video_bridge_(std::move(video_bridge)) { 43 arc_video_bridge_(std::move(video_bridge)) {
47 DCHECK(!g_arc_service_manager); 44 DCHECK(!g_arc_service_manager);
48 g_arc_service_manager = this; 45 g_arc_service_manager = this;
49 46
50 arc_settings_bridge_->StartObservingBridgeServiceChanges(); 47 arc_settings_bridge_->StartObservingBridgeServiceChanges();
51 arc_auth_service_->StartObservingBridgeServiceChanges(); 48 arc_auth_service_->StartObservingBridgeServiceChanges();
52 arc_intent_helper_bridge_->StartObservingBridgeServiceChanges();
53 arc_video_bridge_->StartObservingBridgeServiceChanges(); 49 arc_video_bridge_->StartObservingBridgeServiceChanges();
54 } 50 }
55 51
56 ArcServiceManager::~ArcServiceManager() { 52 ArcServiceManager::~ArcServiceManager() {
57 DCHECK(thread_checker_.CalledOnValidThread()); 53 DCHECK(thread_checker_.CalledOnValidThread());
58 DCHECK(g_arc_service_manager == this); 54 DCHECK(g_arc_service_manager == this);
59 g_arc_service_manager = nullptr; 55 g_arc_service_manager = nullptr;
60 } 56 }
61 57
62 // static 58 // static
(...skipping 10 matching lines...) Expand all
73 69
74 void ArcServiceManager::OnPrimaryUserProfilePrepared( 70 void ArcServiceManager::OnPrimaryUserProfilePrepared(
75 const AccountId& account_id) { 71 const AccountId& account_id) {
76 DCHECK(thread_checker_.CalledOnValidThread()); 72 DCHECK(thread_checker_.CalledOnValidThread());
77 73
78 arc_notification_manager_.reset( 74 arc_notification_manager_.reset(
79 new ArcNotificationManager(arc_bridge_service(), account_id)); 75 new ArcNotificationManager(arc_bridge_service(), account_id));
80 } 76 }
81 77
82 } // namespace arc 78 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/arc_service_manager.h ('k') | components/arc/common/arc_bridge.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698