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

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

Issue 2434463004: mash: Move directly linked NewWindowDelegate to mojom::NewWindowClient. (Closed)
Patch Set: Rebase to ToT Created 4 years, 1 month 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/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/new_window_delegate.h"
11 #include "ash/common/shell_delegate.h" 10 #include "ash/common/shell_delegate.h"
12 #include "ash/common/wallpaper/wallpaper_controller.h" 11 #include "ash/common/wallpaper/wallpaper_controller.h"
13 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
13 #include "ash/public/interfaces/new_window.mojom.h"
14 #include "ash/shell.h" 14 #include "ash/shell.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "components/arc/arc_bridge_service.h" 17 #include "components/arc/arc_bridge_service.h"
18 #include "components/arc/intent_helper/activity_icon_loader.h" 18 #include "components/arc/intent_helper/activity_icon_loader.h"
19 #include "components/arc/intent_helper/link_handler_model_impl.h" 19 #include "components/arc/intent_helper/link_handler_model_impl.h"
20 #include "components/arc/intent_helper/local_activity_resolver.h" 20 #include "components/arc/intent_helper/local_activity_resolver.h"
21 #include "ui/base/layout.h" 21 #include "ui/base/layout.h"
22 #include "url/gurl.h" 22 #include "url/gurl.h"
23 23
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
67 void ArcIntentHelperBridge::OnOpenDownloads() { 67 void ArcIntentHelperBridge::OnOpenDownloads() {
68 DCHECK(thread_checker_.CalledOnValidThread()); 68 DCHECK(thread_checker_.CalledOnValidThread());
69 // TODO(607411): If the FileManager is not yet open this will open to 69 // TODO(607411): If the FileManager is not yet open this will open to
70 // downloads by default, which is what we want. However if it is open it will 70 // downloads by default, which is what we want. However if it is open it will
71 // simply be brought to the forgeground without forcibly being navigated to 71 // simply be brought to the forgeground without forcibly being navigated to
72 // downloads, which is probably not ideal. 72 // downloads, which is probably not ideal.
73 ash::WmShell::Get()->new_window_delegate()->OpenFileManager(); 73 ash::WmShell::Get()->new_window_client()->OpenFileManager();
74 } 74 }
75 75
76 void ArcIntentHelperBridge::OnOpenUrl(const mojo::String& url) { 76 void ArcIntentHelperBridge::OnOpenUrl(const mojo::String& url) {
77 DCHECK(thread_checker_.CalledOnValidThread()); 77 DCHECK(thread_checker_.CalledOnValidThread());
78 GURL gurl(url.get()); 78 GURL gurl(url.get());
79 ash::WmShell::Get()->delegate()->OpenUrlFromArc(gurl); 79 ash::WmShell::Get()->delegate()->OpenUrlFromArc(gurl);
80 } 80 }
81 81
82 void ArcIntentHelperBridge::OpenWallpaperPicker() { 82 void ArcIntentHelperBridge::OpenWallpaperPicker() {
83 DCHECK(thread_checker_.CalledOnValidThread()); 83 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 min_instance_version, nullptr); 164 min_instance_version, nullptr);
165 } 165 }
166 166
167 void ArcIntentHelperBridge::OnIntentFiltersUpdated( 167 void ArcIntentHelperBridge::OnIntentFiltersUpdated(
168 mojo::Array<mojom::IntentFilterPtr> filters) { 168 mojo::Array<mojom::IntentFilterPtr> filters) {
169 DCHECK(thread_checker_.CalledOnValidThread()); 169 DCHECK(thread_checker_.CalledOnValidThread());
170 activity_resolver_->UpdateIntentFilters(std::move(filters)); 170 activity_resolver_->UpdateIntentFilters(std::move(filters));
171 } 171 }
172 172
173 } // namespace arc 173 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698