| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SYNC_PROMO_SYNC_PROMO_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/ui/webui/sync_setup_handler.h" | 9 #include "chrome/browser/ui/webui/sync_setup_handler.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // settings. |show_advanced| is ignored because we never want to display the | 27 // settings. |show_advanced| is ignored because we never want to display the |
| 28 // "Sync Everything" dialog for the sync promo. | 28 // "Sync Everything" dialog for the sync promo. |
| 29 virtual void DisplayConfigureSync(bool show_advanced, | 29 virtual void DisplayConfigureSync(bool show_advanced, |
| 30 bool passphrase_failed) OVERRIDE; | 30 bool passphrase_failed) OVERRIDE; |
| 31 | 31 |
| 32 // content::NotificationObserver implementation. | 32 // content::NotificationObserver implementation. |
| 33 virtual void Observe(int type, | 33 virtual void Observe(int type, |
| 34 const content::NotificationSource& source, | 34 const content::NotificationSource& source, |
| 35 const content::NotificationDetails& details) OVERRIDE; | 35 const content::NotificationDetails& details) OVERRIDE; |
| 36 | 36 |
| 37 // LoginUIService::LoginUI implementation. |
| 38 virtual void CloseUI() OVERRIDE; |
| 39 |
| 37 protected: | 40 protected: |
| 38 virtual void ShowSetupUI() OVERRIDE; | 41 virtual void ShowSetupUI() OVERRIDE; |
| 39 | 42 |
| 40 virtual void RecordSignin() OVERRIDE; | 43 virtual void RecordSignin() OVERRIDE; |
| 41 | 44 |
| 42 private: | 45 private: |
| 43 // JavaScript callback handler to close the sync promo. | 46 // JavaScript callback handler to close the sync promo. |
| 44 void HandleCloseSyncPromo(const base::ListValue* args); | 47 void HandleCloseSyncPromo(const base::ListValue* args); |
| 45 | 48 |
| 46 // JavaScript callback handler to initialize the sync promo. | 49 // JavaScript callback handler to initialize the sync promo. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 88 |
| 86 // If the user closes the whole window we'll get a close notification from the | 89 // If the user closes the whole window we'll get a close notification from the |
| 87 // tab as well, so this bool acts as a small mutex to only report the close | 90 // tab as well, so this bool acts as a small mutex to only report the close |
| 88 // method once. | 91 // method once. |
| 89 bool window_already_closed_; | 92 bool window_already_closed_; |
| 90 | 93 |
| 91 DISALLOW_COPY_AND_ASSIGN(SyncPromoHandler); | 94 DISALLOW_COPY_AND_ASSIGN(SyncPromoHandler); |
| 92 }; | 95 }; |
| 93 | 96 |
| 94 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_HANDLER_H_ | 97 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_HANDLER_H_ |
| OLD | NEW |