OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_BRIDGE_IMPL_H_ | 4 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_BRIDGE_IMPL_H_ |
5 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_BRIDGE_IMPL_H_ | 5 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_BRIDGE_IMPL_H_ |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // Starts listening to state changes of the ArcBridgeService. | 49 // Starts listening to state changes of the ArcBridgeService. |
50 // This must be called before the bridge service starts bootstrapping. | 50 // This must be called before the bridge service starts bootstrapping. |
51 void StartObservingBridgeServiceChanges() override; | 51 void StartObservingBridgeServiceChanges() override; |
52 | 52 |
53 // Called when a Chrome pref we have registered an observer for has changed. | 53 // Called when a Chrome pref we have registered an observer for has changed. |
54 // Obtains the new pref value and sends it to Android. | 54 // Obtains the new pref value and sends it to Android. |
55 void OnPrefChanged(const std::string& pref_name) const; | 55 void OnPrefChanged(const std::string& pref_name) const; |
56 | 56 |
57 // ArcBridgeService::Observer | 57 // ArcBridgeService::Observer |
58 void OnStateChanged(ArcBridgeService::State state) override; | 58 void OnStateChanged(ArcBridgeService::State state) override; |
59 void OnSettingsInstanceReady() override; | 59 |
| 60 // ArcBridgeService::Observer |
| 61 void OnInstanceBootPhase(InstanceBootPhase phase) override; |
60 | 62 |
61 private: | 63 private: |
62 // Registers to observe changes for Chrome settings we care about. | 64 // Registers to observe changes for Chrome settings we care about. |
63 void StartObservingPrefChanges(); | 65 void StartObservingPrefChanges(); |
64 | 66 |
65 // Stops listening for Chrome settings changes. | 67 // Stops listening for Chrome settings changes. |
66 void StopObservingPrefChanges(); | 68 void StopObservingPrefChanges(); |
67 | 69 |
68 // Retrives Chrome's state for the settings and send it to Android. | 70 // Retrives Chrome's state for the settings and send it to Android. |
69 void SyncAllPrefs() const; | 71 void SyncAllPrefs() const; |
(...skipping 12 matching lines...) Expand all Loading... |
82 | 84 |
83 // Manages pref observation registration. | 85 // Manages pref observation registration. |
84 PrefChangeRegistrar registrar_; | 86 PrefChangeRegistrar registrar_; |
85 | 87 |
86 DISALLOW_COPY_AND_ASSIGN(ArcSettingsBridgeImpl); | 88 DISALLOW_COPY_AND_ASSIGN(ArcSettingsBridgeImpl); |
87 }; | 89 }; |
88 | 90 |
89 } // namespace arc | 91 } // namespace arc |
90 | 92 |
91 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_BRIDGE_IMPL_H_ | 93 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_BRIDGE_IMPL_H_ |
OLD | NEW |