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

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

Issue 2271373002: mash: Port mojo:ash_sysui's ContextMenuMus to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 3 months 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 | « chrome/chrome_browser_chromeos.gypi ('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" 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/wm_shell.h" 13 #include "ash/common/wm_shell.h"
13 #include "ash/desktop_background/user_wallpaper_delegate.h"
14 #include "ash/shell.h" 14 #include "ash/shell.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "components/arc/intent_helper/activity_icon_loader.h" 16 #include "components/arc/intent_helper/activity_icon_loader.h"
17 #include "components/arc/intent_helper/link_handler_model_impl.h" 17 #include "components/arc/intent_helper/link_handler_model_impl.h"
18 #include "components/arc/intent_helper/local_activity_resolver.h" 18 #include "components/arc/intent_helper/local_activity_resolver.h"
19 #include "components/arc/set_wallpaper_delegate.h" 19 #include "components/arc/set_wallpaper_delegate.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
23 namespace arc { 23 namespace arc {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::Shell::GetInstance()->user_wallpaper_delegate()->OpenSetWallpaperPage(); 85 ash::WmShell::Get()->wallpaper_delegate()->OpenSetWallpaperPage();
86 } 86 }
87 87
88 void ArcIntentHelperBridge::SetWallpaper(mojo::Array<uint8_t> jpeg_data) { 88 void ArcIntentHelperBridge::SetWallpaper(mojo::Array<uint8_t> jpeg_data) {
89 DCHECK(thread_checker_.CalledOnValidThread()); 89 DCHECK(thread_checker_.CalledOnValidThread());
90 set_wallpaper_delegate_->SetWallpaper(jpeg_data.PassStorage()); 90 set_wallpaper_delegate_->SetWallpaper(jpeg_data.PassStorage());
91 } 91 }
92 92
93 std::unique_ptr<ash::LinkHandlerModel> ArcIntentHelperBridge::CreateModel( 93 std::unique_ptr<ash::LinkHandlerModel> ArcIntentHelperBridge::CreateModel(
94 const GURL& url) { 94 const GURL& url) {
95 DCHECK(thread_checker_.CalledOnValidThread()); 95 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 23 matching lines...) Expand all
119 return handlers_filtered; 119 return handlers_filtered;
120 } 120 }
121 121
122 void ArcIntentHelperBridge::OnIntentFiltersUpdated( 122 void ArcIntentHelperBridge::OnIntentFiltersUpdated(
123 mojo::Array<mojom::IntentFilterPtr> filters) { 123 mojo::Array<mojom::IntentFilterPtr> filters) {
124 DCHECK(thread_checker_.CalledOnValidThread()); 124 DCHECK(thread_checker_.CalledOnValidThread());
125 activity_resolver_->UpdateIntentFilters(std::move(filters)); 125 activity_resolver_->UpdateIntentFilters(std::move(filters));
126 } 126 }
127 127
128 } // namespace arc 128 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/chrome_browser_chromeos.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698