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

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

Issue 2541923002: MD Settings: Add Google Play Store (Arc++) section (Closed)
Patch Set: . Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_ANDROID_APPS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_ANDROID_APPS_HANDLER_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h"
12 #include "base/scoped_observer.h"
13 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
14 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
15
16 class Profile;
17
18 namespace base {
19 class DictionaryValue;
20 }
21
22 namespace chromeos {
23 namespace settings {
24
25 class AndroidAppsHandler : public ::settings::SettingsPageUIHandler,
26 public ArcAppListPrefs::Observer {
27 public:
28 explicit AndroidAppsHandler(Profile* profile);
29 ~AndroidAppsHandler() override;
30
31 // SettingsPageUIHandler
michaelpg 2016/12/01 20:15:34 nit: " overrides." like below
stevenjb 2016/12/02 00:39:19 I changed the copied code below. Preferences vary,
32 void RegisterMessages() override;
33 void OnJavascriptAllowed() override;
34 void OnJavascriptDisallowed() override;
35
36 // ArcAppListPrefs::Observer overrides.
37 void OnAppReadyChanged(const std::string& app_id, bool ready) override;
38 void OnAppRemoved(const std::string& app_id) override;
39 void OnAppRegistered(const std::string& app_id,
40 const ArcAppListPrefs::AppInfo& app_info) override;
41
42 private:
43 std::unique_ptr<base::DictionaryValue> BuildAndroidAppsInfo();
44 void OnAppChanged(const std::string& app_id);
45 void HandleGetAndroidAppsInfo(const base::ListValue* args);
46 void SendAndroidAppsInfo();
47 void ShowAndroidAppsSettings(const base::ListValue* args);
48
49 ScopedObserver<ArcAppListPrefs, ArcAppListPrefs::Observer>
50 arc_prefs_observer_;
51 Profile* profile_; // unowned
52 base::WeakPtrFactory<AndroidAppsHandler> weak_ptr_factory_;
53
54 DISALLOW_COPY_AND_ASSIGN(AndroidAppsHandler);
55 };
56
57 } // namespace settings
58 } // namespace chromeos
59
60 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_ANDROID_APPS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698