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

Side by Side Diff: chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc

Issue 2707133006: Start ARC and sign in after Chrome OS login (Closed)
Patch Set: rebase to ToT Created 3 years, 9 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.h" 5 #include "chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.h"
6 6
7 #include "ash/common/system/chromeos/palette/palette_utils.h" 7 #include "ash/common/system/chromeos/palette/palette_utils.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "chrome/browser/chromeos/arc/arc_util.h" 9 #include "chrome/browser/chromeos/arc/arc_util.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void StylusHandler::OnDeviceListsComplete() { 58 void StylusHandler::OnDeviceListsComplete() {
59 SendHasStylus(); 59 SendHasStylus();
60 } 60 }
61 61
62 void StylusHandler::UpdateNoteTakingApps() { 62 void StylusHandler::UpdateNoteTakingApps() {
63 bool waiting_for_android = false; 63 bool waiting_for_android = false;
64 note_taking_app_ids_.clear(); 64 note_taking_app_ids_.clear();
65 base::ListValue apps_list; 65 base::ListValue apps_list;
66 66
67 NoteTakingHelper* helper = NoteTakingHelper::Get(); 67 NoteTakingHelper* helper = NoteTakingHelper::Get();
68 if (helper->android_enabled() && !helper->android_apps_received()) { 68 if (helper->play_store_enabled() && !helper->android_apps_received()) {
69 // If Android is enabled but not ready yet, let the JS know so it can 69 // If Play Store is enabled but not ready yet, let the JS know so it can
70 // disable the menu and display an explanatory message. 70 // disable the menu and display an explanatory message.
71 waiting_for_android = true; 71 waiting_for_android = true;
72 } else { 72 } else {
73 std::vector<NoteTakingAppInfo> available_apps = 73 std::vector<NoteTakingAppInfo> available_apps =
74 helper->GetAvailableApps(Profile::FromWebUI(web_ui())); 74 helper->GetAvailableApps(Profile::FromWebUI(web_ui()));
75 for (const NoteTakingAppInfo& info : available_apps) { 75 for (const NoteTakingAppInfo& info : available_apps) {
76 auto dict = base::MakeUnique<base::DictionaryValue>(); 76 auto dict = base::MakeUnique<base::DictionaryValue>();
77 dict->SetString(kAppNameKey, info.name); 77 dict->SetString(kAppNameKey, info.name);
78 dict->SetString(kAppIdKey, info.app_id); 78 dict->SetString(kAppIdKey, info.app_id);
79 dict->SetBoolean(kAppPreferredKey, info.preferred); 79 dict->SetBoolean(kAppPreferredKey, info.preferred);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 if (!arc::IsArcAllowedForProfile(profile)) { 128 if (!arc::IsArcAllowedForProfile(profile)) {
129 VLOG(1) << "ARC is not enabled for this profile"; 129 VLOG(1) << "ARC is not enabled for this profile";
130 return; 130 return;
131 } 131 }
132 132
133 arc::LaunchPlayStoreWithUrl(apps_url); 133 arc::LaunchPlayStoreWithUrl(apps_url);
134 } 134 }
135 135
136 } // namespace settings 136 } // namespace settings
137 } // namespace chromeos 137 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/options_stylus_handler.cc ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698