| Index: chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc
|
| diff --git a/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc b/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc
|
| index 0a7d66213e402929985b2b223a2ac10deeecf2e0..60ccced9108b21a614e2fad40cc9b3e2ad67e1b3 100644
|
| --- a/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc
|
| +++ b/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc
|
| @@ -6,7 +6,9 @@
|
|
|
| #include "ash/common/system/chromeos/palette/palette_utils.h"
|
| #include "base/bind.h"
|
| +#include "chrome/browser/chromeos/arc/arc_util.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
|
| #include "ui/events/devices/input_device_manager.h"
|
|
|
| namespace chromeos {
|
| @@ -44,6 +46,9 @@ void StylusHandler::RegisterMessages() {
|
| "setPreferredNoteTakingApp",
|
| base::Bind(&StylusHandler::SetPreferredNoteTakingApp,
|
| base::Unretained(this)));
|
| + web_ui()->RegisterMessageCallback(
|
| + "showPlayStoreApps",
|
| + base::Bind(&StylusHandler::ShowPlayStoreApps, base::Unretained(this)));
|
| }
|
|
|
| void StylusHandler::OnAvailableNoteTakingAppsUpdated() {
|
| @@ -116,5 +121,17 @@ void StylusHandler::SendHasStylus() {
|
| base::FundamentalValue(ash::palette_utils::HasStylusInput()));
|
| }
|
|
|
| +void StylusHandler::ShowPlayStoreApps(const base::ListValue* args) {
|
| + std::string apps_url;
|
| + args->GetString(0, &apps_url);
|
| + Profile* profile = Profile::FromWebUI(web_ui());
|
| + if (!arc::IsArcAllowedForProfile(profile)) {
|
| + VLOG(1) << "ARC is not enabled for this profile";
|
| + return;
|
| + }
|
| +
|
| + arc::LaunchPlayStoreWithUrl(apps_url);
|
| +}
|
| +
|
| } // namespace settings
|
| } // namespace chromeos
|
|
|