| 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 | 59 void OnSettingsInstanceReady() override; |
| 60 // ArcBridgeService::Observer | |
| 61 void OnInstanceBootPhase(InstanceBootPhase phase) override; | |
| 62 | 60 |
| 63 private: | 61 private: |
| 64 // Registers to observe changes for Chrome settings we care about. | 62 // Registers to observe changes for Chrome settings we care about. |
| 65 void StartObservingPrefChanges(); | 63 void StartObservingPrefChanges(); |
| 66 | 64 |
| 67 // Stops listening for Chrome settings changes. | 65 // Stops listening for Chrome settings changes. |
| 68 void StopObservingPrefChanges(); | 66 void StopObservingPrefChanges(); |
| 69 | 67 |
| 70 // Retrives Chrome's state for the settings and send it to Android. | 68 // Retrives Chrome's state for the settings and send it to Android. |
| 71 void SyncAllPrefs() const; | 69 void SyncAllPrefs() const; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 84 | 82 |
| 85 // Manages pref observation registration. | 83 // Manages pref observation registration. |
| 86 PrefChangeRegistrar registrar_; | 84 PrefChangeRegistrar registrar_; |
| 87 | 85 |
| 88 DISALLOW_COPY_AND_ASSIGN(ArcSettingsBridgeImpl); | 86 DISALLOW_COPY_AND_ASSIGN(ArcSettingsBridgeImpl); |
| 89 }; | 87 }; |
| 90 | 88 |
| 91 } // namespace arc | 89 } // namespace arc |
| 92 | 90 |
| 93 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_BRIDGE_IMPL_H_ | 91 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_BRIDGE_IMPL_H_ |
| OLD | NEW |