| 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 | 8 |
| 9 #include "ash/common/new_window_controller.h" |
| 9 #include "ash/common/shell_delegate.h" | 10 #include "ash/common/shell_delegate.h" |
| 10 #include "ash/common/wallpaper/wallpaper_controller.h" | 11 #include "ash/common/wallpaper/wallpaper_controller.h" |
| 11 #include "ash/common/wm_shell.h" | 12 #include "ash/common/wm_shell.h" |
| 12 #include "ash/public/interfaces/new_window.mojom.h" | |
| 13 #include "ash/shell.h" | 13 #include "ash/shell.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "components/arc/arc_bridge_service.h" | 16 #include "components/arc/arc_bridge_service.h" |
| 17 #include "components/arc/intent_helper/activity_icon_loader.h" | 17 #include "components/arc/intent_helper/activity_icon_loader.h" |
| 18 #include "components/arc/intent_helper/link_handler_model_impl.h" | 18 #include "components/arc/intent_helper/link_handler_model_impl.h" |
| 19 #include "components/arc/intent_helper/local_activity_resolver.h" | 19 #include "components/arc/intent_helper/local_activity_resolver.h" |
| 20 #include "ui/base/layout.h" | 20 #include "ui/base/layout.h" |
| 21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
| 22 | 22 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 DCHECK(thread_checker_.CalledOnValidThread()); | 61 DCHECK(thread_checker_.CalledOnValidThread()); |
| 62 icon_loader_->InvalidateIcons(package_name); | 62 icon_loader_->InvalidateIcons(package_name); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void ArcIntentHelperBridge::OnOpenDownloads() { | 65 void ArcIntentHelperBridge::OnOpenDownloads() { |
| 66 DCHECK(thread_checker_.CalledOnValidThread()); | 66 DCHECK(thread_checker_.CalledOnValidThread()); |
| 67 // TODO(607411): If the FileManager is not yet open this will open to | 67 // TODO(607411): If the FileManager is not yet open this will open to |
| 68 // downloads by default, which is what we want. However if it is open it will | 68 // downloads by default, which is what we want. However if it is open it will |
| 69 // simply be brought to the forgeground without forcibly being navigated to | 69 // simply be brought to the forgeground without forcibly being navigated to |
| 70 // downloads, which is probably not ideal. | 70 // downloads, which is probably not ideal. |
| 71 ash::WmShell::Get()->new_window_client()->OpenFileManager(); | 71 ash::WmShell::Get()->new_window_controller()->OpenFileManager(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void ArcIntentHelperBridge::OnOpenUrl(const std::string& url) { | 74 void ArcIntentHelperBridge::OnOpenUrl(const std::string& url) { |
| 75 DCHECK(thread_checker_.CalledOnValidThread()); | 75 DCHECK(thread_checker_.CalledOnValidThread()); |
| 76 ash::WmShell::Get()->delegate()->OpenUrlFromArc(GURL(url)); | 76 ash::WmShell::Get()->delegate()->OpenUrlFromArc(GURL(url)); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void ArcIntentHelperBridge::OpenWallpaperPicker() { | 79 void ArcIntentHelperBridge::OpenWallpaperPicker() { |
| 80 DCHECK(thread_checker_.CalledOnValidThread()); | 80 DCHECK(thread_checker_.CalledOnValidThread()); |
| 81 ash::WmShell::Get()->wallpaper_controller()->OpenSetWallpaperPage(); | 81 ash::WmShell::Get()->wallpaper_controller()->OpenSetWallpaperPage(); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 void ArcIntentHelperBridge::OnIntentFiltersUpdated( | 172 void ArcIntentHelperBridge::OnIntentFiltersUpdated( |
| 173 std::vector<mojom::IntentFilterPtr> filters) { | 173 std::vector<mojom::IntentFilterPtr> filters) { |
| 174 DCHECK(thread_checker_.CalledOnValidThread()); | 174 DCHECK(thread_checker_.CalledOnValidThread()); |
| 175 activity_resolver_->UpdateIntentFilters(std::move(filters)); | 175 activity_resolver_->UpdateIntentFilters(std::move(filters)); |
| 176 | 176 |
| 177 for (auto& observer : observer_list_) | 177 for (auto& observer : observer_list_) |
| 178 observer.OnAppsUpdated(); | 178 observer.OnAppsUpdated(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } // namespace arc | 181 } // namespace arc |
| OLD | NEW |