OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_ANDROID_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_ANDROID_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_ANDROID_H_ |
7 | 7 |
8 #include "base/scoped_observer.h" | 8 #include "base/scoped_observer.h" |
9 #include "chrome/browser/sync/profile_sync_service.h" | 9 #include "chrome/browser/sync/profile_sync_service.h" |
10 #include "chrome/browser/sync/profile_sync_service_observer.h" | 10 #include "chrome/browser/sync/profile_sync_service_observer.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 void HandleShowSyncSettings(const ListValue* args); | 33 void HandleShowSyncSettings(const ListValue* args); |
34 | 34 |
35 // Callback for the "showTermsOfService" message. This opens the terms of | 35 // Callback for the "showTermsOfService" message. This opens the terms of |
36 // service popup. | 36 // service popup. |
37 void HandleShowTermsOfService(const ListValue* args); | 37 void HandleShowTermsOfService(const ListValue* args); |
38 | 38 |
39 // ProfileSyncServiceObserver implementation | 39 // ProfileSyncServiceObserver implementation |
40 virtual void OnStateChanged() OVERRIDE; | 40 virtual void OnStateChanged() OVERRIDE; |
41 | 41 |
42 private: | 42 private: |
| 43 // Update the sync footer visibility. Set |forced| if you want to force to |
| 44 // send an update to the renderer regardless of whether we assume the state |
| 45 // is up to date or not. |
| 46 void UpdateSyncFooterVisibility(bool forced); |
| 47 |
43 // Cached pointer to the sync service for this profile. | 48 // Cached pointer to the sync service for this profile. |
44 ProfileSyncService* sync_service_; | 49 ProfileSyncService* sync_service_; |
45 | 50 |
46 ScopedObserver<ProfileSyncService, WelcomeHandler> observer_manager_; | 51 ScopedObserver<ProfileSyncService, WelcomeHandler> observer_manager_; |
47 | 52 |
48 // Whether the sync footer is visible on the page. | 53 // Whether the sync footer is visible on the page. |
49 bool is_sync_footer_visible_; | 54 bool is_sync_footer_visible_; |
50 | 55 |
51 DISALLOW_COPY_AND_ASSIGN(WelcomeHandler); | 56 DISALLOW_COPY_AND_ASSIGN(WelcomeHandler); |
52 }; | 57 }; |
53 | 58 |
54 #endif // CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_ANDROID_H_ | 59 #endif // CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_ANDROID_H_ |
OLD | NEW |