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

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

Issue 2668153002: Revert of Move more utility functions to arc_util. (Closed)
Patch Set: Created 3 years, 10 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 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 "chrome/browser/ui/webui/settings/chromeos/android_apps_handler.h" 5 #include "chrome/browser/ui/webui/settings/chromeos/android_apps_handler.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/chromeos/arc/arc_session_manager.h" 8 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
9 #include "chrome/browser/chromeos/arc/arc_util.h"
10 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" // kSettingsAppId 10 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" // kSettingsAppId
12 #include "ui/events/event_constants.h" 11 #include "ui/events/event_constants.h"
13 12
14 namespace chromeos { 13 namespace chromeos {
15 namespace settings { 14 namespace settings {
16 15
17 AndroidAppsHandler::AndroidAppsHandler(Profile* profile) 16 AndroidAppsHandler::AndroidAppsHandler(Profile* profile)
18 : arc_prefs_observer_(this), profile_(profile), weak_ptr_factory_(this) {} 17 : arc_prefs_observer_(this), profile_(profile), weak_ptr_factory_(this) {}
19 18
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 base::StringValue("android-apps-info-update"), *info); 85 base::StringValue("android-apps-info-update"), *info);
87 } 86 }
88 87
89 void AndroidAppsHandler::ShowAndroidAppsSettings(const base::ListValue* args) { 88 void AndroidAppsHandler::ShowAndroidAppsSettings(const base::ListValue* args) {
90 CHECK_EQ(1U, args->GetSize()); 89 CHECK_EQ(1U, args->GetSize());
91 bool activated_from_keyboard = false; 90 bool activated_from_keyboard = false;
92 args->GetBoolean(0, &activated_from_keyboard); 91 args->GetBoolean(0, &activated_from_keyboard);
93 int flags = activated_from_keyboard ? ui::EF_NONE : ui::EF_LEFT_MOUSE_BUTTON; 92 int flags = activated_from_keyboard ? ui::EF_NONE : ui::EF_LEFT_MOUSE_BUTTON;
94 93
95 // Settings in secondary profile cannot access ARC. 94 // Settings in secondary profile cannot access ARC.
96 CHECK(arc::IsArcAllowedForProfile(profile_)); 95 CHECK(arc::ArcSessionManager::IsAllowedForProfile(profile_));
97 arc::LaunchAndroidSettingsApp(profile_, flags); 96 arc::LaunchAndroidSettingsApp(profile_, flags);
98 } 97 }
99 98
100 } // namespace settings 99 } // namespace settings
101 } // namespace chromeos 100 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698