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

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

Issue 1590723003: Host-side implementation of ARC Intent handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Support new GURL interface at https://chromium.googlesource.com/chromium/src/+/dfbcc3b7926990bbf523… 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"
17 #include "components/arc/power/arc_power_bridge.h" 18 #include "components/arc/power/arc_power_bridge.h"
18 #include "components/arc/settings/arc_settings_bridge.h" 19 #include "components/arc/settings/arc_settings_bridge.h"
19 #include "components/arc/video/arc_video_bridge.h" 20 #include "components/arc/video/arc_video_bridge.h"
20 #include "ui/arc/notification/arc_notification_manager.h" 21 #include "ui/arc/notification/arc_notification_manager.h"
21 22
22 namespace arc { 23 namespace arc {
23 24
24 namespace { 25 namespace {
25 26
26 // Weak pointer. This class is owned by ChromeBrowserMainPartsChromeos. 27 // Weak pointer. This class is owned by ChromeBrowserMainPartsChromeos.
27 ArcServiceManager* g_arc_service_manager = nullptr; 28 ArcServiceManager* g_arc_service_manager = nullptr;
28 29
29 } // namespace 30 } // namespace
30 31
31 ArcServiceManager::ArcServiceManager( 32 ArcServiceManager::ArcServiceManager(
32 scoped_ptr<ArcAuthService> auth_service, 33 scoped_ptr<ArcAuthService> auth_service,
34 scoped_ptr<ArcIntentHelperBridge> intent_helper_bridge,
33 scoped_ptr<ArcSettingsBridge> settings_bridge, 35 scoped_ptr<ArcSettingsBridge> settings_bridge,
34 scoped_ptr<ArcVideoBridge> video_bridge) 36 scoped_ptr<ArcVideoBridge> video_bridge)
35 : arc_bridge_service_( 37 : arc_bridge_service_(
36 new ArcBridgeServiceImpl(ArcBridgeBootstrap::Create())), 38 new ArcBridgeServiceImpl(ArcBridgeBootstrap::Create())),
37 arc_auth_service_(std::move(auth_service)), 39 arc_auth_service_(std::move(auth_service)),
38 arc_clipboard_bridge_(new ArcClipboardBridge(arc_bridge_service_.get())), 40 arc_clipboard_bridge_(new ArcClipboardBridge(arc_bridge_service_.get())),
39 arc_ime_bridge_(new ArcImeBridge(arc_bridge_service_.get())), 41 arc_ime_bridge_(new ArcImeBridge(arc_bridge_service_.get())),
40 arc_input_bridge_(ArcInputBridge::Create(arc_bridge_service_.get())), 42 arc_input_bridge_(ArcInputBridge::Create(arc_bridge_service_.get())),
43 arc_intent_helper_bridge_(std::move(intent_helper_bridge)),
41 arc_settings_bridge_(std::move(settings_bridge)), 44 arc_settings_bridge_(std::move(settings_bridge)),
42 arc_power_bridge_(new ArcPowerBridge(arc_bridge_service_.get())), 45 arc_power_bridge_(new ArcPowerBridge(arc_bridge_service_.get())),
43 arc_video_bridge_(std::move(video_bridge)) { 46 arc_video_bridge_(std::move(video_bridge)) {
44 DCHECK(!g_arc_service_manager); 47 DCHECK(!g_arc_service_manager);
45 g_arc_service_manager = this; 48 g_arc_service_manager = this;
46 49
47 arc_settings_bridge_->StartObservingBridgeServiceChanges(); 50 arc_settings_bridge_->StartObservingBridgeServiceChanges();
48 arc_auth_service_->StartObservingBridgeServiceChanges(); 51 arc_auth_service_->StartObservingBridgeServiceChanges();
52 arc_intent_helper_bridge_->StartObservingBridgeServiceChanges();
49 arc_video_bridge_->StartObservingBridgeServiceChanges(); 53 arc_video_bridge_->StartObservingBridgeServiceChanges();
50 } 54 }
51 55
52 ArcServiceManager::~ArcServiceManager() { 56 ArcServiceManager::~ArcServiceManager() {
53 DCHECK(thread_checker_.CalledOnValidThread()); 57 DCHECK(thread_checker_.CalledOnValidThread());
54 DCHECK(g_arc_service_manager == this); 58 DCHECK(g_arc_service_manager == this);
55 g_arc_service_manager = nullptr; 59 g_arc_service_manager = nullptr;
56 } 60 }
57 61
58 // static 62 // static
(...skipping 10 matching lines...) Expand all
69 73
70 void ArcServiceManager::OnPrimaryUserProfilePrepared( 74 void ArcServiceManager::OnPrimaryUserProfilePrepared(
71 const AccountId& account_id) { 75 const AccountId& account_id) {
72 DCHECK(thread_checker_.CalledOnValidThread()); 76 DCHECK(thread_checker_.CalledOnValidThread());
73 77
74 arc_notification_manager_.reset( 78 arc_notification_manager_.reset(
75 new ArcNotificationManager(arc_bridge_service(), account_id)); 79 new ArcNotificationManager(arc_bridge_service(), account_id));
76 } 80 }
77 81
78 } // namespace arc 82 } // 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