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

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

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase 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 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_util.h" 8 #include "chrome/browser/chromeos/arc/arc_util.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #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
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 void AndroidAppsHandler::HandleRequestAndroidAppsInfo( 76 void AndroidAppsHandler::HandleRequestAndroidAppsInfo(
77 const base::ListValue* args) { 77 const base::ListValue* args) {
78 SendAndroidAppsInfo(); 78 SendAndroidAppsInfo();
79 } 79 }
80 80
81 void AndroidAppsHandler::SendAndroidAppsInfo() { 81 void AndroidAppsHandler::SendAndroidAppsInfo() {
82 AllowJavascript(); 82 AllowJavascript();
83 std::unique_ptr<base::DictionaryValue> info = BuildAndroidAppsInfo(); 83 std::unique_ptr<base::DictionaryValue> info = BuildAndroidAppsInfo();
84 CallJavascriptFunction("cr.webUIListenerCallback", 84 CallJavascriptFunction("cr.webUIListenerCallback",
85 base::StringValue("android-apps-info-update"), *info); 85 base::Value("android-apps-info-update"), *info);
86 } 86 }
87 87
88 void AndroidAppsHandler::ShowAndroidAppsSettings(const base::ListValue* args) { 88 void AndroidAppsHandler::ShowAndroidAppsSettings(const base::ListValue* args) {
89 CHECK_EQ(1U, args->GetSize()); 89 CHECK_EQ(1U, args->GetSize());
90 bool activated_from_keyboard = false; 90 bool activated_from_keyboard = false;
91 args->GetBoolean(0, &activated_from_keyboard); 91 args->GetBoolean(0, &activated_from_keyboard);
92 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;
93 93
94 // Settings in secondary profile cannot access ARC. 94 // Settings in secondary profile cannot access ARC.
95 CHECK(arc::IsArcAllowedForProfile(profile_)); 95 CHECK(arc::IsArcAllowedForProfile(profile_));
96 arc::LaunchAndroidSettingsApp(profile_, flags); 96 arc::LaunchAndroidSettingsApp(profile_, flags);
97 } 97 }
98 98
99 } // namespace settings 99 } // namespace settings
100 } // namespace chromeos 100 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698