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

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

Issue 1477733002: Add ArcNotificationManager for new ARC notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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 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 "base/sequenced_task_runner.h" 7 #include "base/sequenced_task_runner.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "components/arc/arc_bridge_bootstrap.h" 9 #include "components/arc/arc_bridge_bootstrap.h"
10 #include "components/arc/arc_bridge_service_impl.h" 10 #include "components/arc/arc_bridge_service_impl.h"
11 #include "components/arc/input/arc_input_bridge.h" 11 #include "components/arc/input/arc_input_bridge.h"
12 #include "components/arc/notification/arc_notification_manager.h"
12 13
13 namespace arc { 14 namespace arc {
14 15
15 namespace { 16 namespace {
16 17
17 // Weak pointer. This class is owned by ChromeBrowserMainPartsChromeos. 18 // Weak pointer. This class is owned by ChromeBrowserMainPartsChromeos.
18 ArcServiceManager* g_arc_service_manager = nullptr; 19 ArcServiceManager* g_arc_service_manager = nullptr;
19 20
20 } // namespace 21 } // namespace
21 22
(...skipping 16 matching lines...) Expand all
38 DCHECK(g_arc_service_manager); 39 DCHECK(g_arc_service_manager);
39 DCHECK(g_arc_service_manager->thread_checker_.CalledOnValidThread()); 40 DCHECK(g_arc_service_manager->thread_checker_.CalledOnValidThread());
40 return g_arc_service_manager; 41 return g_arc_service_manager;
41 } 42 }
42 43
43 ArcBridgeService* ArcServiceManager::arc_bridge_service() { 44 ArcBridgeService* ArcServiceManager::arc_bridge_service() {
44 DCHECK(thread_checker_.CalledOnValidThread()); 45 DCHECK(thread_checker_.CalledOnValidThread());
45 return arc_bridge_service_.get(); 46 return arc_bridge_service_.get();
46 } 47 }
47 48
49 void ArcServiceManager::PostProfileInit(const AccountId& account_id) {
50 DCHECK(thread_checker_.CalledOnValidThread());
51
52 arc_notification_manager_.reset(
53 new ArcNotificationManager(arc_bridge_service(), account_id));
54 }
55
48 } // namespace arc 56 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698