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/desktop_background/user_wallpaper_delegate.h" | 10 #include "ash/desktop_background/user_wallpaper_delegate.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::Shell::GetInstance()->new_window_delegate()->OpenFileManager(); | 73 ash::Shell::GetInstance()->new_window_delegate()->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::Shell::GetInstance()->delegate()->OpenUrl(gurl); | 79 ash::Shell::GetInstance()->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()); |
84 ash::Shell::GetInstance()->user_wallpaper_delegate()->OpenSetWallpaperPage(); | 84 ash::Shell::GetInstance()->user_wallpaper_delegate()->OpenSetWallpaperPage(); |
85 } | 85 } |
86 | 86 |
87 void ArcIntentHelperBridge::SetWallpaper(mojo::Array<uint8_t> jpeg_data) { | 87 void ArcIntentHelperBridge::SetWallpaper(mojo::Array<uint8_t> jpeg_data) { |
88 DCHECK(thread_checker_.CalledOnValidThread()); | 88 DCHECK(thread_checker_.CalledOnValidThread()); |
89 set_wallpaper_delegate_->SetWallpaper(jpeg_data.PassStorage()); | 89 set_wallpaper_delegate_->SetWallpaper(jpeg_data.PassStorage()); |
(...skipping 28 matching lines...) Expand all Loading... |
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 |
OLD | NEW |