| 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" | 10 #include "ash/common/new_window_delegate.h" |
| 11 #include "ash/common/shell_delegate.h" | 11 #include "ash/common/shell_delegate.h" |
| 12 #include "ash/common/wallpaper/wallpaper_delegate.h" | 12 #include "ash/common/wallpaper/wallpaper_controller.h" |
| 13 #include "ash/common/wm_shell.h" | 13 #include "ash/common/wm_shell.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/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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 } | 75 } |
| 76 | 76 |
| 77 void ArcIntentHelperBridge::OnOpenUrl(const mojo::String& url) { | 77 void ArcIntentHelperBridge::OnOpenUrl(const mojo::String& url) { |
| 78 DCHECK(thread_checker_.CalledOnValidThread()); | 78 DCHECK(thread_checker_.CalledOnValidThread()); |
| 79 GURL gurl(url.get()); | 79 GURL gurl(url.get()); |
| 80 ash::WmShell::Get()->delegate()->OpenUrlFromArc(gurl); | 80 ash::WmShell::Get()->delegate()->OpenUrlFromArc(gurl); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void ArcIntentHelperBridge::OpenWallpaperPicker() { | 83 void ArcIntentHelperBridge::OpenWallpaperPicker() { |
| 84 DCHECK(thread_checker_.CalledOnValidThread()); | 84 DCHECK(thread_checker_.CalledOnValidThread()); |
| 85 ash::WmShell::Get()->wallpaper_delegate()->OpenSetWallpaperPage(); | 85 ash::WmShell::Get()->wallpaper_controller()->OpenSetWallpaperPage(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void ArcIntentHelperBridge::SetWallpaperDeprecated( | 88 void ArcIntentHelperBridge::SetWallpaperDeprecated( |
| 89 mojo::Array<uint8_t> jpeg_data) { | 89 mojo::Array<uint8_t> jpeg_data) { |
| 90 DCHECK(thread_checker_.CalledOnValidThread()); | 90 DCHECK(thread_checker_.CalledOnValidThread()); |
| 91 LOG(ERROR) << "IntentHelper.SetWallpaper is deprecated"; | 91 LOG(ERROR) << "IntentHelper.SetWallpaper is deprecated"; |
| 92 } | 92 } |
| 93 | 93 |
| 94 std::unique_ptr<ash::LinkHandlerModel> ArcIntentHelperBridge::CreateModel( | 94 std::unique_ptr<ash::LinkHandlerModel> ArcIntentHelperBridge::CreateModel( |
| 95 const GURL& url) { | 95 const GURL& url) { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 min_instance_version, nullptr); | 165 min_instance_version, nullptr); |
| 166 } | 166 } |
| 167 | 167 |
| 168 void ArcIntentHelperBridge::OnIntentFiltersUpdated( | 168 void ArcIntentHelperBridge::OnIntentFiltersUpdated( |
| 169 mojo::Array<mojom::IntentFilterPtr> filters) { | 169 mojo::Array<mojom::IntentFilterPtr> filters) { |
| 170 DCHECK(thread_checker_.CalledOnValidThread()); | 170 DCHECK(thread_checker_.CalledOnValidThread()); |
| 171 activity_resolver_->UpdateIntentFilters(std::move(filters)); | 171 activity_resolver_->UpdateIntentFilters(std::move(filters)); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace arc | 174 } // namespace arc |
| OLD | NEW |