| OLD | NEW |
| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 DCHECK(thread_checker_.CalledOnValidThread()); | 65 DCHECK(thread_checker_.CalledOnValidThread()); |
| 66 icon_loader_->InvalidateIcons(package_name); | 66 icon_loader_->InvalidateIcons(package_name); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void ArcIntentHelperBridge::OnOpenDownloads() { | 69 void ArcIntentHelperBridge::OnOpenDownloads() { |
| 70 DCHECK(thread_checker_.CalledOnValidThread()); | 70 DCHECK(thread_checker_.CalledOnValidThread()); |
| 71 // TODO(607411): If the FileManager is not yet open this will open to | 71 // TODO(607411): If the FileManager is not yet open this will open to |
| 72 // downloads by default, which is what we want. However if it is open it will | 72 // downloads by default, which is what we want. However if it is open it will |
| 73 // simply be brought to the forgeground without forcibly being navigated to | 73 // simply be brought to the forgeground without forcibly being navigated to |
| 74 // downloads, which is probably not ideal. | 74 // downloads, which is probably not ideal. |
| 75 ash::WmShell::Get()->new_window_delegate()->OpenFileManager(); | 75 ash::WmShell::Get()->new_window_client()->OpenFileManager(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void ArcIntentHelperBridge::OnOpenUrl(const mojo::String& url) { | 78 void ArcIntentHelperBridge::OnOpenUrl(const mojo::String& url) { |
| 79 DCHECK(thread_checker_.CalledOnValidThread()); | 79 DCHECK(thread_checker_.CalledOnValidThread()); |
| 80 GURL gurl(url.get()); | 80 GURL gurl(url.get()); |
| 81 ash::WmShell::Get()->delegate()->OpenUrlFromArc(gurl); | 81 ash::WmShell::Get()->delegate()->OpenUrlFromArc(gurl); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void ArcIntentHelperBridge::OpenWallpaperPicker() { | 84 void ArcIntentHelperBridge::OpenWallpaperPicker() { |
| 85 DCHECK(thread_checker_.CalledOnValidThread()); | 85 DCHECK(thread_checker_.CalledOnValidThread()); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 min_instance_version, nullptr); | 166 min_instance_version, nullptr); |
| 167 } | 167 } |
| 168 | 168 |
| 169 void ArcIntentHelperBridge::OnIntentFiltersUpdated( | 169 void ArcIntentHelperBridge::OnIntentFiltersUpdated( |
| 170 mojo::Array<mojom::IntentFilterPtr> filters) { | 170 mojo::Array<mojom::IntentFilterPtr> filters) { |
| 171 DCHECK(thread_checker_.CalledOnValidThread()); | 171 DCHECK(thread_checker_.CalledOnValidThread()); |
| 172 activity_resolver_->UpdateIntentFilters(std::move(filters)); | 172 activity_resolver_->UpdateIntentFilters(std::move(filters)); |
| 173 } | 173 } |
| 174 | 174 |
| 175 } // namespace arc | 175 } // namespace arc |
| OLD | NEW |