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

Side by Side Diff: services/preferences/public/interfaces/preferences.mojom

Issue 2092453002: Mojom interface for Preferences (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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
(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 module prefs.mojom;
6
7 // A Preference could be one of several base types. PrefStore utilizes
8 // base::Value to encompass these. TODO(jonross): create struct traits so that
9 // we can pass base::Value via mojo.
Ben Goodger (Google) 2016/09/08 17:40:08 FYI, Ken tells me there's already param traits sup
jonross 2016/09/09 15:55:35 Yeah there are apparently some of the base::Value
10 struct Preference {
11 enum PreferenceType { INT, STRING };
12
13 PreferenceType type;
14 uint32 integer_value_;
15 string? string_value_;
16 };
17
18 // Used to subscribe to preference changes within PreferenceManager. After
19 // requesting to observe, the current values for all requested keys are sent.
20 interface PreferenceObserver {
21 OnPreferencesChanged(map<string, Preference> preferences);
22 };
23
24 // Manages actual read/write of preference data. Accepts observers who subscribe
25 // to preferences, notifying them of changes.
26 interface PreferenceManager {
27 AddObserver(array<string> preferences, PreferenceObserver client);
28 SetPreferences(map<string, Preference> preferences);
29 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698