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

Side by Side Diff: components/arc/intent_helper/arc_intent_helper_bridge.cc

Issue 2190483003: arc: Revamp the ArcBridgeService interface (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2785
Patch Set: One less diff line Created 4 years, 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/intent_helper/arc_intent_helper_bridge.h" 5 #include "components/arc/intent_helper/arc_intent_helper_bridge.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/desktop_background/user_wallpaper_delegate.h" 10 #include "ash/desktop_background/user_wallpaper_delegate.h"
(...skipping 20 matching lines...) Expand all
31 ArcBridgeService* bridge_service, 31 ArcBridgeService* bridge_service,
32 const scoped_refptr<ActivityIconLoader>& icon_loader, 32 const scoped_refptr<ActivityIconLoader>& icon_loader,
33 std::unique_ptr<SetWallpaperDelegate> set_wallpaper_delegate, 33 std::unique_ptr<SetWallpaperDelegate> set_wallpaper_delegate,
34 const scoped_refptr<LocalActivityResolver>& activity_resolver) 34 const scoped_refptr<LocalActivityResolver>& activity_resolver)
35 : ArcService(bridge_service), 35 : ArcService(bridge_service),
36 binding_(this), 36 binding_(this),
37 icon_loader_(icon_loader), 37 icon_loader_(icon_loader),
38 set_wallpaper_delegate_(std::move(set_wallpaper_delegate)), 38 set_wallpaper_delegate_(std::move(set_wallpaper_delegate)),
39 activity_resolver_(activity_resolver) { 39 activity_resolver_(activity_resolver) {
40 DCHECK(thread_checker_.CalledOnValidThread()); 40 DCHECK(thread_checker_.CalledOnValidThread());
41 arc_bridge_service()->AddObserver(this); 41 arc_bridge_service()->intent_helper()->AddObserver(this);
42 } 42 }
43 43
44 ArcIntentHelperBridge::~ArcIntentHelperBridge() { 44 ArcIntentHelperBridge::~ArcIntentHelperBridge() {
45 DCHECK(thread_checker_.CalledOnValidThread()); 45 DCHECK(thread_checker_.CalledOnValidThread());
46 arc_bridge_service()->RemoveObserver(this); 46 arc_bridge_service()->intent_helper()->RemoveObserver(this);
47 } 47 }
48 48
49 void ArcIntentHelperBridge::OnIntentHelperInstanceReady() { 49 void ArcIntentHelperBridge::OnInstanceReady() {
50 DCHECK(thread_checker_.CalledOnValidThread()); 50 DCHECK(thread_checker_.CalledOnValidThread());
51 ash::Shell::GetInstance()->set_link_handler_model_factory(this); 51 ash::Shell::GetInstance()->set_link_handler_model_factory(this);
52 arc_bridge_service()->intent_helper_instance()->Init( 52 arc_bridge_service()->intent_helper()->instance()->Init(
53 binding_.CreateInterfacePtrAndBind()); 53 binding_.CreateInterfacePtrAndBind());
54 } 54 }
55 55
56 void ArcIntentHelperBridge::OnIntentHelperInstanceClosed() { 56 void ArcIntentHelperBridge::OnInstanceClosed() {
57 DCHECK(thread_checker_.CalledOnValidThread()); 57 DCHECK(thread_checker_.CalledOnValidThread());
58 ash::Shell::GetInstance()->set_link_handler_model_factory(nullptr); 58 ash::Shell::GetInstance()->set_link_handler_model_factory(nullptr);
59 } 59 }
60 60
61 void ArcIntentHelperBridge::OnIconInvalidated( 61 void ArcIntentHelperBridge::OnIconInvalidated(
62 const mojo::String& package_name) { 62 const mojo::String& package_name) {
63 DCHECK(thread_checker_.CalledOnValidThread()); 63 DCHECK(thread_checker_.CalledOnValidThread());
64 icon_loader_->InvalidateIcons(package_name); 64 icon_loader_->InvalidateIcons(package_name);
65 } 65 }
66 66
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 return handlers_filtered; 118 return handlers_filtered;
119 } 119 }
120 120
121 void ArcIntentHelperBridge::OnIntentFiltersUpdated( 121 void ArcIntentHelperBridge::OnIntentFiltersUpdated(
122 mojo::Array<mojom::IntentFilterPtr> filters) { 122 mojo::Array<mojom::IntentFilterPtr> filters) {
123 DCHECK(thread_checker_.CalledOnValidThread()); 123 DCHECK(thread_checker_.CalledOnValidThread());
124 activity_resolver_->UpdateIntentFilters(std::move(filters)); 124 activity_resolver_->UpdateIntentFilters(std::move(filters));
125 } 125 }
126 126
127 } // namespace arc 127 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/intent_helper/arc_intent_helper_bridge.h ('k') | components/arc/intent_helper/link_handler_model_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698